Closed Ahondev closed 8 months ago
Even if this plugin returned vue files with application/javascript
, it won't work. Vue files are not JavaScript files and cannot be executed without transforming to JavaScript. This plugin only copies files without transformation.
I need to use copied .vue files in dev, but .vue MIME type is not in the list of MIME types, so it return a MIME type of "", so i'm unable to import it. I get this error:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.
it seems like in vite-copy-static-copy/dist/index.js, the
var mimes
didn't contain the key "vue". Maybe consider adding it in the list of supported type with a type ofapplication/javascript