-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
The using
keyword cannot be used within .svelte
files
#953
Comments
Typically in Vite if you want to use very new syntax like this, you need to configure this Vite config: esbuild: {
// either this
target: 'es2023',
// or this config also works
supported: {
using: false
}
} However our preprocessor runs its own setup so that config doesn't influence how it runs in Svelte files: vite-plugin-svelte/packages/vite-plugin-svelte/src/preprocess.js Lines 37 to 47 in 80aebfd
The |
in the interim, you might be able to use svelte-preprocess instead, that uses typescript under the hood. |
The reasoning for using target esnext was that the resulting js output is going through vite anyways, so any downleveling would happen there. But obviously this only covers js features, not ts |
Tried forking |
your reproduction does not contain use of $props and you did not share your fork, so we can't tell whats going on. |
Describe the bug
The
using
keyword seems to be unsupported within.svelte
files.Reproduction URL
https://stackblitz.com/edit/vitejs-vite-jnn3rq
Reproduction
No response
Logs
No response
System Info
The text was updated successfully, but these errors were encountered: