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
Is there a reason why a bundle has a separate import statement for every file that uses the exact same external? If I have 4 files that do import { x } from "myexternal"; I end up with a bundle that has (only imports shown for brevity):
Is this about side effects? I tried marking all uses of x as /* @__PURE__ */ but no change. I also tried an external defined in tsconfig.json's path field. I tried --minify too. Here's a minimal repro: https://github.com/heyheyhello/esbuild-merge-externals
Is there a way to just make this into:
import{x}from"myexternal";
I want all references to x in the entire codebase to be a single import statement since I'm passing this to an acorn AST parser after esbuild is done.
Thank you! 🌺
The text was updated successfully, but these errors were encountered:
The reason is that I'm working on a rewrite of the linker to address this and a lot of other issues but the rewrite hasn't landed yet. Closing as a duplicate of #475 since this has already been filed.
Is there a reason why a bundle has a separate import statement for every file that uses the exact same external? If I have 4 files that do
import { x } from "myexternal";
I end up with a bundle that has (only imports shown for brevity):Is this about side effects? I tried marking all uses of
x
as/* @__PURE__ */
but no change. I also tried an external defined in tsconfig.json'spath
field. I tried--minify
too. Here's a minimal repro: https://github.com/heyheyhello/esbuild-merge-externalsIs there a way to just make this into:
I want all references to
x
in the entire codebase to be a single import statement since I'm passing this to an acorn AST parser after esbuild is done.Thank you! 🌺
The text was updated successfully, but these errors were encountered: