egoist / rollup-plugin-esbuild

Use ESBuild with Rollup to transform ESNext and TypeScript code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

BryceMehring opened this issue · comments

Same issue as rollup/plugins#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,
}

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

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