Open unoctanium opened 5 years ago
I don't think even after setting the correct mime type the above code will work. That is because .vue
files can't be directly understood by browsers. Something like vue-loader
(for webpack) is required to convert .vue
files to browser understandable code. And Web Maker files mode is a simple HTML/CSS/JavaScript environment without build processes like webpack.
If you want to use Vue, you'll have to run without .vue
files. Check out the sample in templates.
Meta info
In the files-version of web-maker (beta) I try to write a simple multi file vue app. Unfortunately that is not possible.
When importing my App.vue file from script.js, I get this error in the chrome dev console and my app doesn't work:
Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. App.vue:1
It seems to be a problem with the html server configuration for .vue-files.
Suggestion: *.vue-files should not be served as MIME Type "text/html" but "application/javascript"
Here my code:
Index.html:
Script.js
App.vue: