chinchang / chinchang/web-maker

Vue app: Wrong Mime-Type of *.vue-files

Open
#407 1 comment 0 reactions 0 assignees View on GitHub
wontfix
Dominant language
JavaScript
Stars
2.7k
Forks
323
PR merge metrics
No merged PRs in 30d

Description

## Meta info

- Is this a bug or suggestion?: Suggestion
- Version (click on help icon in footer): 4.0.3
- Context - Web app, Chrome extension or both?: Web app

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:

```




Vuetify app template









```

Script.js

```
import App from "./App.vue"

const app = new Vue({
vuetify: new Vuetify(),
data: {
message: 'World'
},
render: h => h(App)
}).$mount('#app')
```

App.vue:

```




Hello {{test}}


export default {
name: "Vuetify App Template",
data() {
return {
test: "Hello"
}
},
}

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.