Closed vieira closed 3 years ago
The reason is that we take all deps and devdeps from your package.json and put those as externals. I'll change it so you can additionally pass in any other externals as you do right now.
I just released a new version where your external
config should now work as expected. Thank you for reporting!
Hello,
I tried defining
pg-native
as an external dependency but it seems the option is ignored, i.e., not being merged with the computed externals here:https://github.com/folke/esbuild-runner/blob/5f005db17becd14cdfe2025c41b82f2bc9d19d9e/src/esbuild.ts#L94
My
esbuild-runner.config.js
:and the error that is produced when running:
I should note that I am using npm7 workspaces and that
pg-native
is a dependency of a dependency of another package in the workspace, if I add the dependency directly to thepackage.json
of the package I am trying to run it works (theexternals
computation finds it).