node package manager

webpack-tool

webpack-tool

webpack build result view, support features:

  • webpack build server, file memory, hot update.

  • 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_SERVER = process.env.NODE_SERVER;
 
const webpackConfig = [weexNativeConfig, weexWebConfig];
 
const webpackTool = new WebpackTool();
 
if (NODE_SERVER) {
  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:9000/debug

UI-VIEW