7.1.3 2.6.1 git clone ...
yarn
cd packages/office-ui-fabric-vue
yarn rollup -c
(check ./lib)
Modules should be emitted into ./lib/, e.g. ./lib/index.js.
Modules are emitted with the relative path to the project root, e.g. ./lib/packages/office-ui-fabric-vue/src/index.js.
I think this might stem form the _virtual folder being emitted from the project root rather than the package root. Maybe this is an issue with i.e. node-resolve? Sadly I have no idea where to look to triage this...
_(It looks like you used the template from rollup/rollup. You're in rollup/plugins fwiw ๐ )_
Thanks for the repo, but I'm afraid there's a bit too much going on there to effectively triage. In the plugin repo's issue template for bugs, there's a link that explains what and why we need a _minimal_ reproduction. I don't think we'll be able to triage this one for you unless you're able to drill / distill your repo down to a minimal reproduction case. Like a teensy tiny reproduction that exhibits the same behavior.
(Yeah, sorry. Initially I wanted to open it in rollup, but I wasn't sure if it was plugin related or not...)
You are totally right, sorry. I created a small repro to showcase this issue. I've included the built files in git:
git clone https://github.com/johannes-z/rollup-yarn-preserveModules
yarn install
# optional, already built, doesn't use rollup anyway
cd packages/producer
yarn build
cd packages/consumer
yarn build
packages/consumer then created ./lib/packages/consumer/src/index.js.
I've also tried pnpm: packages/consumer created ./lib/src/index.js in this case... pnpm does not change anything in my production repo though.
Edit: I'm pretty sure this is related to @rollup/plugin-node-resolve. Removing it changes the emitted modules (although they are still not correct) to: lib/consumer/src/index.js
Not sure, but could it be related to #277 ? I opened that issue as a suggestion, but later realized that plugin-node-resolve is actually messing up output paths..
Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it.# Comment to post when closing a stale issue. โ
I am running into this same issue now @johannes-z did you ever solve it?
yes. you have to mark every node module put into _virtual as external, then the output will be correct.
Most helpful comment
(Yeah, sorry. Initially I wanted to open it in rollup, but I wasn't sure if it was plugin related or not...)
You are totally right, sorry. I created a small repro to showcase this issue. I've included the built files in git:
packages/consumerthen created./lib/packages/consumer/src/index.js.I've also tried
pnpm:packages/consumercreated./lib/src/index.jsin this case... pnpm does not change anything in my production repo though.Edit: I'm pretty sure this is related to
@rollup/plugin-node-resolve. Removing it changes the emitted modules (although they are still not correct) to:lib/consumer/src/index.js