Skip to content
New issue

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

为什么用webpack2打包会生成多余代码 #720

Closed
muyi0327 opened this issue Mar 16, 2017 · 3 comments
Closed

为什么用webpack2打包会生成多余代码 #720

muyi0327 opened this issue Mar 16, 2017 · 3 comments

Comments

@muyi0327
Copy link

muyi0327 commented Mar 16, 2017

用webpack2打包编译vue会生成很多多余代码,例如:
"webpack:///(webpack)/~/node-libs-browser/~/buffer/index.js","webpack:///(webpack)/~/node-libs-browser/~/buffer/~/base64-js/index.js","webpack:///(webpack)/~/node-libs-browser/~/buffer/~/ieee754/index.js","webpack:///(webpack)/~/node-libs-browser/~/buffer/~/isarray/index.js","w

这是截取的相应的sourcemap文件中对应的文件。对应源码里多了1500行左右代码。

@hilookas
Copy link

Use English, please.

@agileago
Copy link

@muyi0327 这个是css-loader的问题 ,他们好像正在解决 webpack-contrib/css-loader#454

暂时可以在 webpack的配置里面加上

node: {
  Buffer: false
}

@muyi0327
Copy link
Author

@agileago fixed! thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants