umi icon indicating copy to clipboard operation
umi copied to clipboard

[Bug] vite 模式和 react 新的转换不兼容

Open urielvan opened this issue 3 years ago • 1 comments

What happens?

配置中启用 vite 模式后,无法正常使用 react 新的转换模式。 控制台中报错 The requested module '/node_modules/react/jsx-runtime.js' does not provide an export named 'jsx'

Mini Showcase Repository(REQUIRED)

repo

How To Reproduce

Steps to reproduce the behavior: 执行 npm start 之后在浏览器中打开,无法正常显示页面

Expected behavior 和使用 webpack 时一样可以正常打开页面

Context

  • Umi Version: 4.0.9
  • Node Version: 16.16.0
  • Platform: win10

urielvan avatar Aug 02 '22 06:08 urielvan

same issue

zhanghaoxu avatar Sep 06 '22 07:09 zhanghaoxu

在最新版本(umi 4.0.41)已经可用。

fz6m avatar Jan 05 '23 04:01 fz6m