-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
[@vitejs/plugin-vue-jsx] importing vue sfc with jsx does not work if custom queries added #23
Comments
IIUC extension needs to be at the end of id. So |
We can likely work around this in Nuxt - but would you welcome a PR to change the behaviour in Vite so that it isn't dependent on query order? |
Probably no. Even if vue-jsx plugin accepted it, plugins which assume |
I'd second working around it in Nuxt at the meantime. There's a solution of using But this isn't commonly used yet, and it would break the ecosystem otherwise. I agree though that a behaviour like this isn't great at a glance, but I'd imagine a migration over to (I haven't considered other consequence of dropping the extensions check yet) |
Describe the bug
In Nuxt 3, custom queries are added to id when importing files under pages directory, such as
/pages/index.vue?vue&type=script&lang.jsx¯o=true
(in this case,macro=true
)In this case, vue jsx plugin does not acknowledge the context and throws an error.
More info: nuxt/nuxt#13435
Probably related to PR vitejs/vite#7121
Reproduction
https://stackblitz.com/edit/vitejs-vite-uo2vwz
System Info
Used Package Manager
yarn
Logs
Validations
The text was updated successfully, but these errors were encountered: