Skip to content

preserveModules creates wrong output #3743

@johannes-z

Description

@johannes-z

Expected Behavior

The emitted lib folder should look like this:

  • main.js
  • HelloWorld.vue_rollup-plugin....js
  • HelloWorld.vue.js

Actual Behavior

The emitted lib folder looks like this:

  • node_modules/
  • src
    • HelloWorld.vue_rollup-plugin....js
    • HelloWorld.vue.js
  • main.js

The plugins resolve and commonjs do nothing to remedy this, also adding those libraries added to node_modules to externals does nothing.

Additional

In a monorepo, all the files within lib are also under the path the monorepo is under, i.e. if the package is in /my-project/packages/my-package, the output will look like this. /my-project/packages/my-package/lib/package/my-package/main.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions