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
Running esbuild under npm explore no longer works #3741
Comments
In fact, there's a similar issue raised in that repo: egoist/bundle-require#42 I believe this is not an issue with esbuild. esbuild do have an option |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe the problem was introduced by the externals change in 0.16.0
Prevent entry files to be marked as externals
#2382
Originally I thought the problem was in tsup:
tsup no longer works with npm explore
egoist/tsup#1110
I think the problem is that when esbuild is run via npm explore, it is run inside a node_modules folder, so it tries to mark all files as external, which means no files inside that folder can be "used", since everything is marked as external.
The error message is:
The entry point "/private/tmp/myproject/node_modules/@enonic/react4xp/tsup.config.client.ts" cannot be marked as external
So I'm assuming tsup is using esbuild to transpile tsup.config.client.ts to tsup.config.client.js, before using it as configuration for the actual build. So tsup has tsup.config.client.ts as an entrypoint, and esbuild complains because it has marked everything under it's parent, parent, parent (node_modules) as external, and an entrypoint can't be an external.
Hmm, perhaps the fix is for tsup to explicitly avoid marking anything as external?
The text was updated successfully, but these errors were encountered: