You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens only if there is a node_modules directory in the build directory. This happens in one of the packages of my client. The reason is that during the build process, polyfills with babel are added with an import statement in the resulting .js files. The import statement is relative to the node_modules directory in the build directory, which contains only the babel polyfills.
If I do npm pack, it will pack the node_modules directory in the tarball. It also copies it to the ~/.yalc directory. But yalc add does not include it.
The reason is that in src/syncDir.ts, there is a hardcoded const ignore = '**/node_modules/**'.
In my opinion this should be removed because it differs from the actual behaviour of npm pack and it conflicts with what is stated in the README.md: "It will copy all the files that should be published in remote NPM registry."
Instead I suggest to provide a --ignore-node-modules flag to yalc add.
The text was updated successfully, but these errors were encountered:
I'm having this same problem, Yalc publish is not doing the same as npm pack/publish does, because npm pack clearly lists the node_modules and I get those in the actual published package.
This happens only if there is a
node_modules
directory in thebuild
directory. This happens in one of the packages of my client. The reason is that during the build process, polyfills with babel are added with an import statement in the resulting.js
files. The import statement is relative to thenode_modules
directory in the build directory, which contains only the babel polyfills.If I do
npm pack
, it will pack thenode_modules
directory in the tarball. It also copies it to the~/.yalc
directory. Butyalc add
does not include it.The reason is that in
src/syncDir.ts
, there is a hardcodedconst ignore = '**/node_modules/**'
.In my opinion this should be removed because it differs from the actual behaviour of
npm pack
and it conflicts with what is stated in the README.md: "It will copy all the files that should be published in remote NPM registry."Instead I suggest to provide a
--ignore-node-modules
flag toyalc add
.The text was updated successfully, but these errors were encountered: