wclr / yalc

Work with yarn/npm packages locally like a boss.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yalc doesn't only remove the root node_modules

simonpca opened this issue · comments

When publishing our libs to npm with npm publish, the top-level node_modules get stripped but the ones inside the bundled code with the dependencies (eg. dist/node_modules or dist/esm/node_modules) are kept so that the resolutions for bundled dependencies still work (confirmed by running npx npm-packlist).

yalc publish seems to do so as well (this dist/node_modules appears in the version that's published in ~/.yalc but somehow gets stripped when using yalc add to add it to a project.

I could not find anything to override this (using a negated rule inside the .yalcignore didn't seem to help either).

I think I'm running into this as well. I just used yalc for the first time yesterday. When I first tried it, I had an issue because of (I assume) one of the package dependencies being a peer/dev dependency when it should have been a direct dependency. I verified this by checking the ./.yalc folder and saw node_modules with other packages, just not the one(s) I already noticed were missing. But then when I tried subsequent publishes, I no longer see any node_modules being bundled anymore at all.

commented

Totally agree, I'm using unbuild to develop and I have this problem

image

any update for this issue? I have the same problem
I need the node_modules in dist folder but yalc doesn't publish it

I am running into this as well. Has anyone figured it out yet?

I meet the problem that yalc doesn't publish dist folder too

Same issue here. For those using rollup with an output where preserveModules: true this is huge pain. Any workarounds for the time being?