注意事项: webpack5不在包含node的默认包。 BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need these module and configure a polyfill for it.
If you want to include a polyfill, you need to: - add an alias 'resolve.alias: { "path": "path-browserify" }' - install 'path-browserify' If you don't want to include a polyfill, you can use an empty module like this: resolve.alias: { "path": false }