rollup-plugin-esbuild icon indicating copy to clipboard operation
rollup-plugin-esbuild copied to clipboard

browser: true ignored when used with @rollup/plugin-node-resolve

Open BryceMehring opened this issue 1 year ago • 1 comments

Same issue as https://github.com/rollup/plugins/issues/1267.

I'm getting

(!) Unresolved dependencies
https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency
zlib (imported by "zlib?commonjs-external")
http (imported by "http?commonjs-external")
https (imported by "https?commonjs-external")
assert (imported by "assert?commonjs-external")
stream (imported by "stream?commonjs-external")

What fixes this problem is running this plugin as:

{
  ...esbuild(),
  resolveId: undefined,
}

BryceMehring avatar Aug 07 '23 15:08 BryceMehring

In my environment I needed to replace resolveId a little differently.

{
  ...esbuild(),
  resolveId: () => null,
}

tbrannam avatar Apr 08 '24 20:04 tbrannam