Webpack-tool
Webpack3 (Webpack-tool 3.0.0) And Webpack2 (Webpack-tool 2.0.0) Build Tool, Support Features:
-
development mode, webpack build server, file memory, hot update.
-
publish mode, webpack build file to disk.
-
support webpack build result ui view.
Install
$ npm i webpack-tool --save
Usage
const WebpackTool = require('webpack-tool');
const weexNativeConfig = require('./weex/native');
const weexWebConfig = require('./weex/web');
const NODE_ENV = process.env.VIEW;
const webpackConfig = [weexNativeConfig, weexWebConfig];
const webpackTool = new WebpackTool();
if (NODE_ENV === 'development') {
webpackTool.server(webpackConfig);
} else {
webpackTool.build(webpackConfig);
}
Run
"scripts": {
"start": "cross-env node build"
}
npm start
Start Webpack Debug Server: http://127.0.0.1:8888/debug
