Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] yalc add does not include the same files as npm pack & publish #231

Open
timbicker opened this issue Oct 25, 2023 · 1 comment
Open

Comments

@timbicker
Copy link

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.

@djmarcos88
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants