Open Aghassi opened 1 year ago
Are those dependencies expected within the bundle or as runtime deps of the bundle?
Yes I expected it to be in the bundle generated by esbuild.
Can you provide a simple example to reproduce it? What and how does syncpack.config.js
import from syncpack:node_modules
?
I can look into setting up a repro until we can find time to pair, but specifically the config imports fdir
package which imports picomatch
.
https://www.npmjs.com/package/fdir https://www.npmjs.com/package/picomatch
I declare both in the package.json that is used by the config and pass the :node_modules
from that to esbuild to bundle it in.
What happened?
I have an esbuild rule that I would assume is bundling a small config and it should have dependencies built into the output. However, on CI we found that the bundled config was missing the node_modules that were passed into the
deps
array for theesbuild
rule call. See example code belowThis manifested in the config silently failing due to missing dependencies which I fixed by passing
node_modules
to thedata
array in the js_binary.Note, the js_binary target is executed via
bazel run
Version
Development (host) and target OS/architectures:
Output of
bazel --version
: 6.1.0Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:Language(s) and/or frameworks involved:
How to reproduce
Any other information?
No response