Skip to content

导致 babel-plugin-transform-react-jsx 解析 jsx 无法生效 #124

@yeyuguo

Description

@yeyuguo

Basic Info

  • Package Name And Version: arco-design-pro@2.8.0
  • Framework version: react17
  • Browser: chrome124.0.0.0

Extra info

开发了内部的 babel 插件,插件不能生效;

  1. 排查是因为 @arco-plugins/webpack-react 插件导致 babel-plugin-transform-react-jsx 无法生效;
  2. 如果换成 @arco-design/webpack-plugin 就能正常了;
  3. @arco-plugins/webpack-react 设置过 babelOption 的 presets,有其他错误导致,未达预期;

What is expected?

期望 @arco-plugins/webpack-react 让 babel-plugin-transform-react-jsx 生效;

Steps to reproduce

步骤3目的无法生效

  1. 声明 import ArcoWebpackPlugin from '@arco-plugins/webpack-react';
  2. Use new ArcoWebpackPlugin({
    theme: '@arco-design/xxxx',
    webpackImplementation: webpack,
    })
  3. 引入个人实现 babel 插件:config?. plugins?. push([babel-xxxx...])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions