Open
Description
Consuming dependencies that have to be transformed using the @rollup/plugin-commonjs
plugin break when version >18
of the plugin is used.
I have a simple example repository: https://github.com/peschee/wds-commonjs-example
In the main
branch, trying to run wds (npm run start
) shows the following error when importing apexcharts
or moment
(those are the ones I tested):
Uncaught SyntaxError: The requested module '/__web-dev-server__/rollup/moment.js?web-dev-server-rollup-null-byte=%00%2FUsers%2Fpsiska%2Ftemp%2Fwds-commonjs-test%2Fnode_modules%2Fmoment%2Fmoment.js%3Fcommonjs-module' does not provide an export named 'exports'
I also have a simple rollup build in the repo, using the same plugins as in wds, and that one works (npm run build
).
Downgrading @rollup/plugin-commonjs
to ^18
makes the imports work again in wds: https://github.com/peschee/wds-commonjs-example/pull/1/files
Metadata
Metadata
Assignees
Labels
No labels