restore webpack code-split feature for weex, this plugin need you to give a fs read function and it will use
new Function to run your splited code.
npm install weex-code-split-plugin --saveadd below to you webpack.config.js
constWeexCodeSplitPlugin=require('weex-code-split-plugin')module.exports={plugins: [newWeexCodeSplitPlugin({fsReadFunction:weexFSRead,publicPath: '/Share/ULightApp'})]}fsReadFunction(required, string/function): fs read function, do not use any es6 syntax for compatibility.
publicPath(optional, string): override webpack's public path for weexFSRead's base path.
if you wants to use this in dev mode running at real device. you need to rewrite the publicPath as below
constip=require('ip').address()constport=require('../port')// you portweexConfig.plugins.forEach((item)=>{if(iteminstanceofWeexCodeSplitPlugin){item.options.publicPath=`http://${ip}:${port}/`}})