wulie88 opened a new issue #3305:
URL: https://github.com/apache/incubator-weex/issues/3305


   我是吴烈,从2017年开始使用Weex,非常感谢这个开源项目。
   
   
   ## Describe the bug
   
   最近在研究jsfm时候发现自带Vue环境,而Weex Cli打包时候又内置了Vue,运行时重复,造成js文件体积大。
   
   
目前我是通过Webpack设置成外部Vue,再打包,生成的页面js体积减少220KB,只有业务代码,我们代码控制在100KB以内,以上是没有压缩的情况下,开启gzip后几乎不要流量。
   
   在iOS及安卓上测试通过。
   
   ```
   externals: {
       'vue': 'Vue'
   },
   ```
   
   ps:请加在WeexConfig的webpack中,WebConfig还是需要内置Vue
   
   ## Environment
   
   * weex cli: 2.0.0-beta.31 (Core 2.0.0-beta.31)
   * multipages
   
   使用最新的weex cli配置的多页应用。
   
   ## Screenshots
   
   
![BB5D850D-5D96-463C-9850-DCC307C20B33](https://user-images.githubusercontent.com/783824/100301040-427c1d80-2fd2-11eb-923e-48c3d2faa3af.png)
   
![CE56A255-04BB-425E-8987-06C9F7B0E25A](https://user-images.githubusercontent.com/783824/100301044-4445e100-2fd2-11eb-9508-947644e91ef7.png)
   
   ## Additional context
   
   大家都可以试试,有问题发评论,我会及时回复。
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to