alibaba / lowcode-engine

An enterprise-class low-code technology stack with scale-out design / 一套面向扩展设计的企业级低代码技术体系
https://lowcode-engine.cn
MIT License
14.58k stars 2.53k forks source link

使用@alilc/lowcode-plugin-code-editor插件,控制台会报Uncaught ReferenceError: process is not defined #797

Closed meizilove258 closed 2 years ago

meizilove258 commented 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'), } }

以上配置中的process模块,我在项目中也进行了按装,但扔报上述错误,错误见下图:

image image

即使我在给webpack.config.js中的 new DefinePlugin({'process.env.BABEL_TYPES_8_BREAKING': ''})进行这样的配置process.env.BABEL_TYPES_8_BREAKING的值我也不知道应该赋个啥样的值。

目前是我不知道该如何解决这样报错,谢谢!!

SxxPorsche commented 2 years ago

@meizilove258 老哥请问你怎么解决的?

meizilove258 commented 2 years ago

这是我解决问题的文章,欢迎查看,希望能帮到你:https://mp.weixin.qq.com/s/I2agMVACwRVB7fVddHZlwA