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:[email protected]]
发送时间: 2017年8月4日 11:45
收件人: [email protected]
主题: [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 黄炳金 <[email protected]>:
> 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:[email protected]]
> 发送时间: 2017年7月24日 18:19
> 收件人: [email protected]
> 主题: 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 黄炳金 <[email protected]>:
>
> > 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
> >
> >
>