Weex Native and Web building boilerplate for Webpack
npm install easywebpack-cli -g
npm install
npm start
npm start
// 编译文件到磁盘打包使用(发布正式环境)
npm run build 或者 easy build prod
//build/index.js
const easywebpack = require('easywebpack-weex');
const weexConfig = require('./weex/native');
const webConfig = require('./weex/web');
const NODE_SERVER = process.env.NODE_SERVER;
const webpackConfig = [weexNativeConfig, weexWebConfig];
if (process.env.NODE_ENV === 'development') {
easywebpack.start(webpackConfig);
} else {
easywebpack.build(webpackConfig);
}
start webpack debug server: http://127.0.0.1:8888/debug