Open huseeiin opened 4 days ago
sometimes, we want to bundle all of our local imports (i.e. ./utils.js) but not our node_modules (i.e. svelte)
./utils.js
node_modules
svelte
Implement esbuild packages: "external" option https://esbuild.github.io/api/#packages
packages: "external"
import pkg from "./package.json"; Bun.build({ external: Object.keys(pkg.dependencies), });
i like this
Basically its like a transpiler but only bundles local imports. another example is tsup (built on esbuild), it externalizes all devDependencies without even asking it.
tsup
devDependencies
What is the problem this feature would solve?
sometimes, we want to bundle all of our local imports (i.e.
./utils.js
) but not ournode_modules
(i.e.svelte
)What is the feature you are proposing to solve the problem?
Implement esbuild
packages: "external"
option https://esbuild.github.io/api/#packagesWhat alternatives have you considered?