Closed meizilove258 closed 2 years ago
使用官司@alilc/lowcode-plugin-code-editor插件,控制台会报Uncaught ReferenceError: process is not defined
我看了下官方的webapck版本是4.x。我的项目中webpack是5.x。5.x中文档提到像node核心模块webpack不包含在内。如果想使用可以配置。我按官方配置webpack.config.js如下: { resolve: { process: require.resolve('process/browser'), } }
{ resolve: { process: require.resolve('process/browser'), } }
以上配置中的process模块,我在项目中也进行了按装,但扔报上述错误,错误见下图:
即使我在给webpack.config.js中的 new DefinePlugin({'process.env.BABEL_TYPES_8_BREAKING': ''})进行这样的配置process.env.BABEL_TYPES_8_BREAKING的值我也不知道应该赋个啥样的值。
目前是我不知道该如何解决这样报错,谢谢!!
@meizilove258 老哥请问你怎么解决的?
这是我解决问题的文章,欢迎查看,希望能帮到你:https://mp.weixin.qq.com/s/I2agMVACwRVB7fVddHZlwA
使用官司@alilc/lowcode-plugin-code-editor插件,控制台会报Uncaught ReferenceError: process is not defined
我看了下官方的webapck版本是4.x。我的项目中webpack是5.x。5.x中文档提到像node核心模块webpack不包含在内。如果想使用可以配置。我按官方配置webpack.config.js如下:
{ resolve: { process: require.resolve('process/browser'), } }
以上配置中的process模块,我在项目中也进行了按装,但扔报上述错误,错误见下图:
即使我在给webpack.config.js中的 new DefinePlugin({'process.env.BABEL_TYPES_8_BREAKING': ''})进行这样的配置process.env.BABEL_TYPES_8_BREAKING的值我也不知道应该赋个啥样的值。
目前是我不知道该如何解决这样报错,谢谢!!