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

🧐[问题]Webpack5编译报错 #326

Open
jasonlbw opened this issue Oct 23, 2024 · 1 comment
Open

🧐[问题]Webpack5编译报错 #326

jasonlbw opened this issue Oct 23, 2024 · 1 comment

Comments

@jasonlbw
Copy link

jasonlbw commented Oct 23, 2024

🧐 问题描述

Node:18.17.0
Webpack:5.95.0
JS编译配置信息:

rules: [
      /* config.module.rule('js') */
      {
        test: /\.(j|t|mj)sx?$/,
        type: 'javascript/auto',
        include: [
          /node_modules\/@ant-design\/pro-chat\//,
          /node_modules\/@ant-design\/pro-editor\//,
          /node_modules\/_@ant-design_pro-editor\//,
          /node_modules\/react-markdown\//,
        ],
        exclude: [
          /node_modules/
        ],
        use: [
          /* config.module.rule('js').use('esbuild') */
          {
            loader: 'esbuild-loader',
            options: {
              loader: 'tsx',
              target: [
                'es2018',
                'chrome90',
                'edge90',
                'firefox90',
                'safari13'
              ]
            }
          },
          /* config.module.rule('js').use('dynamic-import') */
          {
            loader: '@ali/dynamic-import-loader',
            options: {
              importOptions: [
                {
                  libraryName: 'antd',
                  libraryDirectory: 'es',
                  style: true
                },
                {
                  libraryName: '@alifd/next',
                  libraryDirectory: 'es',
                  style: true
                }
              ]
            }
          }
        ],
        resolve: {
          fullySpecified: false
        }
      }
]

报错信息:
image

💻 示例代码

🚑 其他信息

@AmAzing129
Copy link
Collaborator

缺少更多信息,但从截图来看应该是 immer 版本问题 immerjs/immer#901 需要 pro-editor 升级 可以尝试 package.json.overrides

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants