Skip to content
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

plugin-react-refresh 1.3.0 causes "Support for the experimental syntax ... isn't currently enabled" #1970

Closed
mape opened this issue Feb 10, 2021 · 0 comments

Comments

@mape
Copy link

mape commented Feb 10, 2021

After upgrading plugin-react-refresh from 1.2.2 to 1.3.0 I started getting errors with my React class components using MobX and @observer decorators.

@vitejs/plugin-react-refresh": "1.2.2"

Works as expected, no errors.

@vitejs/plugin-react-refresh": "1.3.0"

xx:xx:xx [vite] Internal server error: path\file1.tsx: Support for the experimental syntax 'classProperties' isn't currently enabled (27:17):
xx:xx:xx [vite] Internal server error: path\file2.tsx: Support for the experimental syntax 'decorators-legacy' isn't currently enabled (26:1):

Temporary fix

Removing enforce: 'pre', inside packages/plugin-react-refresh/index.js makes the code compile again:
4037c55#diff-e6fc286e2eecd57ae2d4ddbe88fda7c47fdce8fb2011a712dab756dda4ea8131R44

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant