@babel/plugin-transform-react-jsx doesn't work properly #72
Replies: 1 comment
-
In v2 JSX requires extra parsing and transformation for tooling and the convention is to signal it with the You should migrate your code to use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
我的英文表述可能不太准确,见谅。
My English expression may not be accurate, thanks for understanding.
我正在尝试启动我的第一个
vite-react
工程,但是我发现vite
无法处理带jsx
语法的.js
文件I'm trying to start up my first
vite-react
project,but I found that vite can't resolve.js
file containsjsx
syntax.因此我试着添加
@babel/plugin-transform-react-jsx
插件到babel配置中,但又出现了另一个报错So I tried to add
@babel/plugin-transform-react-jsx
plugin to babel config, and then I got another error report:我以前使用webpack时
@babel/plugin-transform-react-jsx
这个插件工作得很好,而且以前也没有过这个报错,我不想按照报错中的提示传入一个插件名,我想知道确切的报错原因。
@babel/plugin-transform-react-jsx
plugin works well in webpack project and I never see this error before,I don't want to use two separate instances of a plugin, I just want to know exactly how the error was raised, so I don't want to pass an unique name as parameter.
请问有人知道怎么解决这个问题么?非常感谢。
Does anyone knows how to resolve this? thanks.
node version: 14.18.0
vite version: 3.2.4
my
vite.config.js
:package.json
Beta Was this translation helpful? Give feedback.
All reactions