-
Notifications
You must be signed in to change notification settings - Fork 1.5k
使用webpack的externals来指定echarts无法减少包的大小 #92
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
Comments
|
我也是,全写成 |
SidKwok
added a commit
to SidKwok/vue-echarts
that referenced
this issue
Aug 18, 2017
Closed
我理解不应该把 |
如果 code split 无效,再讨论这个 issue。先关闭了。 |
@Justineo 尝试过 使用commonsChunk无法剥离出echarts |
参考webpack官方文档,实际测试可用。 |
不要用require,直接在main.js中import 然后vue.use就行。
|
确实解决了问题, 棒棒! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
重现步骤:
webpack.base.conf.js
中加入:打包出来的vendor大小是 713kb
去掉externals打包出来的vendor大小是:713kb
还是把所有东西打包到bundle中去了,有解决方法吗?还是说我的使用方式有问题?
我是想通过script方式引入echarts来并行加载echarts的
The text was updated successfully, but these errors were encountered: