Hi danwu, Your suggestion is very helpful, and it seems like solved our problem.
Thanks a log. Best Regards! HuangBJ -----邮件原件----- 发件人: danwu wu [mailto:faterr...@gmail.com] 发送时间: 2017年8月4日 15:24 收件人: dev@weex.incubator.apache.org 主题: [weex.incubator.apache.org代发]Re: How to code splitting with webpack Hi,HuangBJ, Here are some documents,hope this help you! BroadcastChannel APi: https://weex-project.io/cn/references/jsfm-apis.html issues #1536: https://github.com/alibaba/weex/issues/1536 Best Regards! erha 2017-08-04 15:14 GMT+08:00 danwu wu <faterr...@gmail.com>: > Hi,HuangBJ, > > Weex encourage you to use native ideas to solve the page problem,my > advice is that you can split the logic of multiple blocks into > multiple weex instances in a single page. > If you want to communicate between multiple instances,you can also see: > https://github.com/alibaba/weex/issues/1938,you can use the runtime > hook to inject some instance variables when such a Weex instance > created in such a JS framework.That requires you to make some support at the > native side. > > Best Regards! > erha > > 2017-08-04 14:54 GMT+08:00 黄炳金 <huan...@landicorp.com>: > >> Hi faterrole, >> For example, we have 30 functions, each function write in a >> single JS file, so we have 30 JS files. >> A file just like index.js will call the 30 functions above >> sequencely. And then after compiled, index.js will include the 30 JS >> files content, and will become big size. >> >> That is why I want using code splitting. >> >> Thanks a lot! >> >> Best Regards! >> HuangBJ >> >> >> -----邮件原件----- >> 发件人: danwu wu [mailto:faterr...@gmail.com] >> 发送时间: 2017年8月4日 11:45 >> 收件人: dev@weex.incubator.apache.org >> 主题: [weex.incubator.apache.org代发]Re: 答复: How to code splitting with >> webpack >> >> Hi~ HuangBJ, >> >> I'm not very sure about your scene, can you provide an example? >> >> Best Regards! >> erha >> >> 2017-08-04 11:01 GMT+08:00 黄炳金 <huan...@landicorp.com>: >> >> > Hi faterrole, >> > Thanks for your reply. >> > You recommend method below seems like not usable on weex >> > environment. >> > >> > I think the major problems are weex not support global variable. >> > >> > Do you have any suggestions for me? >> > >> > Best Regards! >> > HuangBJ >> > >> > -----邮件原件----- >> > 发件人: 吴丹武 [mailto:faterr...@gmail.com] >> > 发送时间: 2017年7月24日 18:19 >> > 收件人: dev@weex.incubator.apache.org >> > 主题: Re: How to code splitting with webpack >> > >> > Hi~ HuangBJ >> > >> > >> > I have not tried but maybe you can use webpack target option see >> > https://webpack.js.org/configuration/target/. >> > >> > By the way,this way is not recommended packaging method,you can >> > also use weexpack to package your application >> > >> > Best Regards! >> > erha >> > >> > >> > 2017-07-24 16:01 GMT+08:00 黄炳金 <huan...@landicorp.com>: >> > >> > > Hi Weex Team, >> > > >> > > When I use webpack to code splitting, It will generate >> “window” >> > > Object. >> > > >> > > But in android native, “window” is not support, will run >> error. >> > > >> > > How could I code splitting with webpack? >> > > >> > > Do you have any suggestion for me? >> > > >> > > >> > > Best Regards! >> > > HuangBJ >> > > >> > > >> > >> > >