网页
综合
更新时间 2026-11-14 16:19:20
Node | webpack
自动蜘蛛
webpack.js.org
正文约 1495 字
The following Node.js options configure whether to polyfill or mock certain Node.js globals.
This feature is provided by webpack's internal NodeStuffPlugin plugin.
As of webpack 5, You can configure only global, __filename/import.meta.filename or __dirname/import.meta.dirname under node option. If you're looking for how to polyfill fs alike in Node.js under webpack 5, please check resolve.fallback for help.
The node option may be set to false to completely turn off the NodeStuffPlugin plugin.
If you are using a module which needs global variables in it, use ProvidePlugin instead of global.
See the Node.js documentation for the exact behavior of this object.
boolean 'mock' | 'warn-mock' | 'node-module' | 'eval-only'
The default value can be affected by different target:
boolean 'mock' | 'warn-mock' | 'node-module' | 'eval-only'
The default value can be affected by different target:
Copyright OpenJS Foundation and webpack contributors. All rights reserved. The OpenJS Foundation has registered trademarks and uses trademarks. For a list of trademarks of the OpenJS Foundation, please see our Trademark Policy and Trademark List. Trademarks and logos not indicated on the list of OpenJS Foundation trademarks are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
The OpenJS Foundation | Terms of Use | Privacy Policy | Bylaws | Code of Conduct | Trademark Policy | Trademark List | Cookie Policy
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。