3.1.6 • Published 7 years ago

webpack-tool-x v3.1.6

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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

//build/index.js
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') {
  // start webpack build and show build result ui view
  webpackTool.server(webpackConfig);
} else {
  // if you want to show build result ui view for build mode, please set  process.env.BUILD_VIEW=true
  webpackTool.build(webpackConfig);
}

Run

"scripts": {
  "start": "cross-env node build"
 }   
npm start

Start Webpack Debug Server: http://127.0.0.1:8888/debug

UI-VIEW