Closed lydemann closed 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.
require
Should the plugin also support CJS?
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.
Adding "type":"module", to my package.json file fixed this issue.
"type":"module",
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?