sapphi-red / vite-plugin-static-copy

rollup-plugin-copy with dev server support.
MIT License
299 stars 32 forks source link

"vite-plugin-static-copy" resolved to an ESM file #104

Closed lydemann closed 8 months ago

lydemann commented 8 months ago

When I run with a non mjs config I get:

ERROR: [plugin: externalize-deps] "vite-plugin-static-copy" resolved to an ESM file. ESM file cannot be loaded by require. See https://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only for more details.

Should the plugin also support CJS?

sapphi-red commented 8 months ago

No, this plugin won't support CJS any more. I don't think changing the config file to be ESM is hard as it doesn't interact with many things.

Ken-vdE commented 1 month ago

Adding "type":"module", to my package.json file fixed this issue.