-
-
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
Vite not compiling vue SFCs without literal vue/compiler-sfc
#6234
Comments
For someone else finding this, there is a workaround: In the {
"devDependencies": {
"vue/compiler-sfc": "npm:@vue/compiler-sfc@^3"
}
} |
If you use |
@stygian-desolator And, unfortunately, that would still leave the error message with a wrong hint on how to solve it. |
to match the peer dependency version in the `package.json`. `@vue/compiler-sfc` is no longer used, therefore removed from the message. Closes vitejs#6234
Describe the bug
When vue 3 is aliased, vite does not seem to be able to find the compiler-sfc package, even if it is explicitly installed (
@vue/compiler-sfc
).From some brief dive into the code, the problem seems to be in plugin-vue/src/compiler.ts, where when trying to resolve the package, the
@
symbol is not being considered, whereas previously it was.The error message produced suggests that installing the package will solve the problem, so either the error message needs to be adjusted, or the problem needs to be solved at the root (I suggest including trying to resolve the package with the
@
symbol).Reproduction
Check out
https://stackblitz.com/edit/vitejs-vite-b9ckpd?file=package.json
In the terminal run
npm i && npm run dev
and you will see the error message.The only changes I made was to alias vue and include
@vue/compiler-sfc
as a devDependency.System Info
Used Package Manager
yarn
Logs
Validations
The text was updated successfully, but these errors were encountered: