Bug Description
I needed proxy support for node's built-in fetch. So I installed undici as a dependency and used setGlobalDispatcher together with ProxyAgent. Afterwards my rollup build failed with:
> rollup -c
./index.js → test...
(!) Unresolved dependencies
https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency
node:sqlite (imported by "node:sqlite?commonjs-external")
(!) Circular dependency
node_modules/undici/lib/web/websocket/util.js -> node_modules/undici/lib/web/websocket/connection.js -> node_modules/undici/lib/web/websocket/util.js
It also seems that node:sqlite is included in the final bundle. Do I need to configure rollup differently or is this a bug? I had no bundling problems before introducing undici…
Reproducible By
Clone https://github.com/soulchild/undici-rollup-bundle-failure and run npm run build.
Expected Behavior
rollup should be able to bundle undici without problems … and not include node:sqlite 😉
Environment
Bug Description
I needed proxy support for node's built-in
fetch. So I installedundicias a dependency and usedsetGlobalDispatchertogether withProxyAgent. Afterwards my rollup build failed with:It also seems that
node:sqliteis included in the final bundle. Do I need to configure rollup differently or is this a bug? I had no bundling problems before introducing undici…Reproducible By
Clone https://github.com/soulchild/undici-rollup-bundle-failure and run
npm run build.Expected Behavior
rollupshould be able to bundleundiciwithout problems … and not includenode:sqlite😉Environment