For example
A file named tsc.vue,
import tsc from "./tsc.vue";
It's ok,but
import tsc from "./tsc";
not work,report
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.
vite version:0.12.0This isn't a bug. The import tsc from "./tsc.vue" is correct way to import vue module.
I think @underfin is right. vite is different from webpack-compiled contents, it require module directly without solved anything, including file extensions.
This is by design. We will also stop supporting extension-less Vue imports in vue-cli in the next major.
Most helpful comment
This is by design. We will also stop supporting extension-less Vue imports in vue-cli in the next major.