小编red*_*dab的帖子

Webpack 错误 - configuration.node 具有未知属性“fs”

我在使用最新版本的 Webpack (5.1.0) 时遇到错误。看起来配置正在抛出错误,因为验证架构过于严格。这是我的 webpack 配置文件的要点,以及我看到的错误消息。

webpack.config.js

https://gist.github.com/adarshbhat/3ec5950b66b78102da0cf46e51a3d633

错误

[webpack-cli] 
Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
 - configuration.node should be one of these:
   false | object { __dirname?, __filename?, global? }
   -> Include polyfills or mocks for various node stuff.
   Details:
    * configuration.node has an unknown property 'module'. These properties are valid:
      object { __dirname?, __filename?, global? }
      -> Options object for node compatibility features.
    * configuration.node has …
Run Code Online (Sandbox Code Playgroud)

javascript node.js antlr4 webpack

25
推荐指数
4
解决办法
1万
查看次数

标签 统计

antlr4 ×1

javascript ×1

node.js ×1

webpack ×1