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 code works, but the output in ./dist ends up containing a folder called node_modules/, which causes node to think that files under that path are actual node modules. Since that output directory doesn't contain a package.json, node thinks it's a CommonJS module and gets confused to why there's an ESM file in there.
As a temporary fix, I have dropped [dir] from entryNames so that no folder named node_modules will end up in ./dist. I am using entryNames: [name]-[hash], but I am worried I am going to get a collision due to the large number of files I'm building with similar names. I would love to add [dir] back because it makes debugging and viewing build output easier for me.
It would be great if I could customize the name of the output file to ensure that there's no node_modules name in it's path. I think this might be possibility related to the onEmit plugin API mentioned in #553
Again thank you so much for esbuild!
The text was updated successfully, but these errors were encountered:
First thank you so much for esbuild. It is an absolute joy to work with!
Issue
I'm running into an issue where I need to bundle some files from a directory in
node_modules
.This code works, but the output in
./dist
ends up containing a folder callednode_modules/
, which causes node to think that files under that path are actual node modules. Since that output directory doesn't contain a package.json, node thinks it's a CommonJS module and gets confused to why there's an ESM file in there.Minimal reproduction
https://github.com/ryanto/esbuild-entrynames-dir
Temp fix I'm using
As a temporary fix, I have dropped
[dir]
fromentryNames
so that no folder namednode_modules
will end up in./dist
. I am usingentryNames: [name]-[hash]
, but I am worried I am going to get a collision due to the large number of files I'm building with similar names. I would love to add [dir] back because it makes debugging and viewing build output easier for me.It would be great if I could customize the name of the output file to ensure that there's no
node_modules
name in it's path. I think this might be possibility related to theonEmit
plugin API mentioned in #553Again thank you so much for esbuild!
The text was updated successfully, but these errors were encountered: