Javascript 将React应用程序与节点模块中的包绑定

Javascript 将React应用程序与节点模块中的包绑定,javascript,node.js,reactjs,babeljs,parceljs,Javascript,Node.js,Reactjs,Babeljs,Parceljs,我在发布一个节点模块时遇到了一些问题,该模块使用Parcel捆绑一个小型应用程序。在本地,我可以毫无问题地构建,但是发布到npm后,在单独的项目中安装模块时,构建失败: .../client/index.js:7:16: This experimental syntax requires enabling one of the following parser plugin(s): 'jsx, flow, typescript' (7:16) 5 | import Client from '

我在发布一个节点模块时遇到了一些问题,该模块使用Parcel捆绑一个小型应用程序。在本地,我可以毫无问题地构建,但是发布到npm后,在单独的项目中安装模块时,构建失败:

.../client/index.js:7:16: This experimental syntax requires enabling one of the following parser plugin(s): 'jsx, flow, typescript' (7:16)
  5 | import Client from './client';
  6 |
> 7 | ReactDOM.render(<Client />, document.getElementById('root'));
{
  "presets": ["env", "react"]
}