-
-
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
Support javascript decorators #16616
Comments
esbuild target: es2022 |
Is there a work around at current stage except for waiting for the next version of vite? |
The frontend framework I use is now using Javascript decorators and I cannot update to the latest version because of this. |
If you want to upgrade esbuild now for your project, you can use overrides. This would be updated in the next minor. |
FYI this does not work with an ESNext or ES2022 target. Setting the target to ES2020 does work, but a newer target fails:
It's also worth noting that you need to update the babel config if you want import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react({
babel: {
plugins: [
['@babel/plugin-proposal-decorators', { version: '2023-11' }],
],
},
}),
],
}) |
Note that #17290 is not enough to get "JS decorator" support. You also need to set |
Description
Support javascript decorators
Suggested solution
Update esbuild to v0.21
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: