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

webpack打包bundle.js体积大小优化 #2

Open
ubuntugx opened this issue Jun 11, 2016 · 0 comments
Open

webpack打包bundle.js体积大小优化 #2

ubuntugx opened this issue Jun 11, 2016 · 0 comments

Comments

@ubuntugx
Copy link
Owner

原文 youngwind/blog#65
项目优化步骤:

1.转到项目文件夹,运行

webpack --config webpack.config.dev.js \ 
--display-modules --sort-modules-by size

查看所有模块大小
lodash.js 有 500k,而且并没有用上

2.运行

webpack --config webpack.config.dev.js \
--profile --json > stats.json

将运行详细信息导出为 json 文件,并上传至
http://alexkuz.github.io/webpack-chart/ (图表 better)
或者
http://webpack.github.io/analyse/
分析模块大小

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

No branches or pull requests

1 participant