Closed wuhaohuang closed 11 months ago
replenish: my current naming is vite.config.ts, is not working
Please read the error message and the linked page.
"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.
hi~ I made this update progress: Bump vite-plugin-static-copy from 0.17.0 to 1.0.0 and vite from 4.3.9 to 5.0.10.
Now the module no longer loads on Vite in any way:
When I downgraded, everything went back to normal. So the problem is in the version 1.0.0 Or I renamed the file vite.config.js to vite.config.mjs and this is working now.
Your module was using the file name as a reference to know if it was an ESM or not. pls check and good luck.