-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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:vite:esbuild] Transform failed with 1 error: Unexpected "@",when using styled-components+mobx+ts #2776
Comments
Components in the src/Hello.tsx |
who can help you ? |
I don't know (⊙o⊙)… |
did the issue got resolved? I am still facing the same issue even with the fix. |
@thecodejack please open a new issue with a minimal reproduction if you found a bug (or regression) against the latest version of Vite. Thanks! |
@patak-js looks like issue is when decorators are used by dep node modules? Is there anyways I can make vite considers them to be compiled instead of creating a prebuild? I tried to add
|
Let's not discuss on old closed issues. You can start a GitHub Discussion or join the chat at Vite Land to ask questions. Thanks! |
Have created same in #3215 |
Describe the bug
When I'm rendering a styled component, I get the following error:
[plugin:vite:esbuild] Transform failed with 1 error: Unexpected "@".
Reproduction
See vite-bug-with-styled-components
When I created a new TSX component that used the Styled component in this component, and used the mobx@observer component, I got an error: [Plugin :vite:esbuild] Transform failed with 1 error: Unexpected "@". When I remove the styled components in the component, it runs normally
System Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager: npm
The text was updated successfully, but these errors were encountered: