-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import *.vue file without .vue will not work #178
Comments
This isn't a bug. The |
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. |
Does the Vue CLI have this documented somewhere? I was trying to find something that standardizes how imports are expected to be formatted, but could not. |
Describe the bug
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.
Reproduction
System Info
vite
version:0.12.0The text was updated successfully, but these errors were encountered: