Steps to Reproduce
Install nuxt 3 base
Use vite
Use vite plugin with vite-plugin-node-polyfills
Use sentry Plugin
"nuxt build" fails
Does not happen, when using polyfills or sentry separately.
Expected Result
build success
Actual Result
ERROR "sentry-release-injection-file" is imported as an external by "browserify-sign/algos.js?commonjs-external", but is already an existing non-external module id. 16:08:04
ERROR "sentry-release-injection-file" is imported as an external by "browserify-sign/algos.js?commonjs-external", but is already an existing non-external module id. 16:08:04
at error (node_modules/.pnpm/rollup@3.26.2/node_modules/rollup/dist/es/shared/node-entry.js:2245:30)
Hello,
I hat an issue get this plugin working with a sentry vite plugin, as described here: https://github.com/rollup/rollup-plugin-commonjs/pull/327
I did the following
Environment Linux with Node 18
Steps to Reproduce Install nuxt 3 base Use vite Use vite plugin with vite-plugin-node-polyfills Use sentry Plugin "nuxt build" fails Does not happen, when using polyfills or sentry separately.
Expected Result build success
Actual Result ERROR "sentry-release-injection-file" is imported as an external by "browserify-sign/algos.js?commonjs-external", but is already an existing non-external module id. 16:08:04
ERROR "sentry-release-injection-file" is imported as an external by "browserify-sign/algos.js?commonjs-external", but is already an existing non-external module id. 16:08:04
at error (node_modules/.pnpm/rollup@3.26.2/node_modules/rollup/dist/es/shared/node-entry.js:2245:30)
As stated in the answer, sentry advised to take a look at https://github.com/rollup/rollup-plugin-commonjs/pull/327 which provides a similar solution which may fit in for vite-plugin-node-polyfills as well.