-
Notifications
You must be signed in to change notification settings - Fork 46
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
Acorn: SyntaxError: Identifier 'RefreshRuntime' has already been declared #1361
Labels
Comments
Hey @tony19, sorry about the radio silence. Fix coming soon :) |
Any estimate when will the new version be released to the marketplace? |
@TheYarin aiming for early next week. |
🙏 |
v1.17.4 was just pushed to VS Code Marketplace, should be live within an hour or two. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Preview.js cannot render basic React component in newly scaffolded Vite React TypeScript + SWC project. It works fine for the normal Vite React TypeScript template (without SWC).
Logs
Unable to render HelloWorld While Preview.js can work out of the box for simple components, you may need a custom configuration to render components that depend on:a specific state or context (see Wrapping components)
modules imported via aliases
static assets or SVGR
Please see the logs below:
[5:49:58 PM] Unable to parse /Users/atrinh5/src/tmp/vite-tmp/src/components/HelloWorld.tsx with Acorn: SyntaxError: Identifier 'RefreshRuntime' has already been declared (10:7)
[5:49:58 PM] TypeError: Failed to fetch dynamically imported module: http://localhost:3141/preview/src/components/HelloWorld.tsx
Reproduction
npm init vite@latest
. Pick React and TypeScript + SWC.src/components/HelloWorld.tsx
with sample code:Open HelloWorld in Preview.js
(shown above component name inHelloWorld.tsx
).Preview.js version
v1.17.3
Framework
React 18.2.0
System Info
Used Package Manager
npm
Extension logs (useful for crashes)
Preview logs (useful for rendering errors)
Repo link (if available)
https://github.com/tony19-sandbox/vite-ts-react-swc
Anything else?
No response
The text was updated successfully, but these errors were encountered: