We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在引入 Vue 时,webpack 会很好心的帮我们引入几个垫片库 /buildin/global.js, ./node_modules/setimmediate/setImmediate.js, ./node_modules/timers-browserify/main.js, ./node_modules/process/browser.js, 为啥呢?
/buildin/global.js
./node_modules/setimmediate/setImmediate.js
./node_modules/timers-browserify/main.js
./node_modules/process/browser.js
官方文档:
这些选项可以配置是否 polyfill 或 mock 某些 Node.js 全局变量和模块。这可以使最初为 Node.js 环境编写的代码,在其他环境(如浏览器)中运行。
之前使用场景都是浏览器,所以这样的 polyfill 是可行的,但是在当前的环境中是不可行的。
解决:
// webpack config node: false
官方文档:Node
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Node 模块的 polyfill
在引入 Vue 时,webpack 会很好心的帮我们引入几个垫片库
/buildin/global.js
,./node_modules/setimmediate/setImmediate.js
,./node_modules/timers-browserify/main.js
,./node_modules/process/browser.js
, 为啥呢?官方文档:
之前使用场景都是浏览器,所以这样的 polyfill 是可行的,但是在当前的环境中是不可行的。
解决:
官方文档:Node
The text was updated successfully, but these errors were encountered: