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
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:
tsup uses bundle-require to load its options, which runs esbuild with a custom resolver plugin that intentionally marks all paths with node_modules as external:
I believe this is not an issue with esbuild. esbuild do have an option --packages=external but this will not wrongly mark the entry point as external when the entry is in node_modules.
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: