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 tried to exclude an external module which located at upper folder of the project location:
eg: esbuild index.js --minify --external=../../sha256.min.js
but it says Invalid module name.
The text was updated successfully, but these errors were encountered:
Yeah right now that only accepts module names, not file paths. That could be a feature to add.
What's your use case for excluding a file from an upper folder? Is it a package nested inside another package? Do you not have control over the outer package? Also: are you bundling for node or the browser?
My case is that I'm building a library that use sha256 library. But that external sha256 library is used by other project too, and I don't want to include it in the build.
But now I have found temporary solution: first, change the ../../sha256.min.js. into sha256.min.js, build it with external. Then find the filename, and add ../../ haha.. but it works now.. I hope you can add ../../ support in the external feature in the future..
Thanks~
evanw
changed the title
support for relative upper folder path exclude (--exclude:../../module.js)
support for relative external path (--external:../../module.js)
Jun 22, 2020
I tried to exclude an external module which located at upper folder of the project location:
eg:
esbuild index.js --minify --external=../../sha256.min.js
but it says Invalid module name.
The text was updated successfully, but these errors were encountered: