Reactjs 如何阻止React CRA中的Babel解析节点_模块

Reactjs 如何阻止React CRA中的Babel解析节点_模块,reactjs,babeljs,node-modules,create-react-app,Reactjs,Babeljs,Node Modules,Create React App,我有一个新创建的React-CRA+typescript项目,在这个项目中,我还导入了一个私有npm模块,为了这个问题,我将其重命名为@XXX/TARGETMODULE(这是我们公司内部的一个包,所以…) 我保留了CRA生成的所有文件。 但是当我启动服务器时,我得到了以下错误 SyntaxError: ./node_modules/@XXX/TARGETMODULE/src/components/form/FormikDropdownSelect/FormikDropdownSelect.js

我有一个新创建的React-CRA+typescript项目,在这个项目中,我还导入了一个私有npm模块,为了这个问题,我将其重命名为
@XXX/TARGETMODULE
(这是我们公司内部的一个包,所以…)

我保留了CRA生成的所有文件。 但是当我启动服务器时,我得到了以下错误


SyntaxError: ./node_modules/@XXX/TARGETMODULE/src/components/form/FormikDropdownSelect/FormikDropdownSelect.js: 
Support for the experimental syntax 'classProperties' isn't currently enabled (14:16):

  12 |   }
  13 | 
> 14 |   handleChange = (option, setFieldValue, name) => {
     |                ^
  15 |     const value = option ? option.key : null
  16 |     setFieldValue(name, value, true)
  17 |   }

Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' 
section of your Babel config to enable transformation.
即使添加了
@babel/plugin建议类属性
,错误也会不断出现

在任何情况下,我都不想巴贝尔解析我的
node\u模块
,我想这就是大多数项目所期望的?我怎样才能阻止这种事情发生


SyntaxError: ./node_modules/@XXX/TARGETMODULE/src/components/form/FormikDropdownSelect/FormikDropdownSelect.js: 
Support for the experimental syntax 'classProperties' isn't currently enabled (14:16):

  12 |   }
  13 | 
> 14 |   handleChange = (option, setFieldValue, name) => {
     |                ^
  15 |     const value = option ? option.key : null
  16 |     setFieldValue(name, value, true)
  17 |   }

Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' 
section of your Babel config to enable transformation.