在webpack.config.js中添加如下配置:
target: ‘node‘, node: { __dirname: false, __filename: false, }
详见:https://github.com/webpack/webpack/issues/1599
原文地址:https://www.cnblogs.com/demonrain/p/9089678.html
时间: 2024-11-26 03:43:57
在webpack.config.js中添加如下配置:
target: ‘node‘, node: { __dirname: false, __filename: false, }
详见:https://github.com/webpack/webpack/issues/1599
原文地址:https://www.cnblogs.com/demonrain/p/9089678.html