webpack-tool
webpack build and webpack build result web view
Last updated 7 years ago by hubcarl .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install webpack-tool 
SYNC missed versions from official npm registry.

webpack-tool

Koa Webpack Dev Server:

  • development mode, start webpack koa server, file memory, hot update.

  • production mode, webpack build file to disk.

Version

  • webpack 5: webpack-tool: 5.x.x
  • webpack 4: webpack-tool: 4.x.x
  • webpack 3: webpack-tool: 3.x.x

Install

$ npm i webpack-tool --save

Usage

//build/index.js
const WebpackTool = require('webpack-tool');
const NODE_ENV = process.env.VIEW;

const webpackTool = new WebpackTool({
  devServer: {
    before: before => {
      // register koa middleware
    },
    after: app => {
      // register koa middleware
    },
    proxy: {
      '/api': {
        target: 'http://localhost:3000',
        pathRewrite: {'^/api' : ''}
      }
    },
    historyApiFallback: {
      index: '/app.html'
    }
  }
});

const webpackConfig = {
  entry:{
    index: './src/index.js'
  },
  module:{
    rules:[]
  }
  plugins: []
};

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);
}

Configuration

config.devServer support follow option:

Run

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

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

UI-VIEW

Current Tags

  • 3.1.8                                ...           3.x (7 years ago)
  • 3.1.5                                ...           3x (8 years ago)
  • 5.0.4                                ...           5x (5 years ago)
  • 5.0.3                                ...           latest (5 years ago)
  • 4.4.1                                ...           next (7 years ago)

66 Versions

  • 5.0.4                                ...           5 years ago
  • 5.0.3                                ...           5 years ago
  • 5.0.2                                ...           5 years ago
  • 5.0.1                                ...           5 years ago
  • 5.0.0                                ...           5 years ago
  • 5.0.0-beta.3                                ...           5 years ago
  • 5.0.0-beta.2                                ...           6 years ago
  • 5.0.0-beta.1                                ...           6 years ago
  • 4.5.4                                ...           6 years ago
  • 4.5.3                                ...           6 years ago
  • 4.5.1                                ...           6 years ago
  • 4.5.0                                ...           6 years ago
  • 4.4.9                                ...           7 years ago
  • 4.4.8                                ...           7 years ago
  • 4.4.7                                ...           7 years ago
  • 4.4.6                                ...           7 years ago
  • 4.4.5                                ...           7 years ago
  • 4.4.4                                ...           7 years ago
  • 4.4.3                                ...           7 years ago
  • 4.4.2                                ...           7 years ago
  • 4.4.1                                ...           7 years ago
  • 4.4.0                                ...           7 years ago
  • 4.3.2                                ...           7 years ago
  • 4.2.2                                ...           7 years ago
  • 4.3.1                                ...           7 years ago
  • 4.3.0                                ...           7 years ago
  • 3.1.8                                ...           7 years ago
  • 4.2.1                                ...           7 years ago
  • 4.2.0                                ...           8 years ago
  • 4.2.0-rc.4                                ...           8 years ago
  • 4.2.0-rc.3                                ...           8 years ago
  • 4.2.0-rc.2                                ...           8 years ago
  • 4.2.0-rc.1                                ...           8 years ago
  • 3.1.7                                ...           8 years ago
  • 3.1.6                                ...           8 years ago
  • 4.1.1                                ...           8 years ago
  • 4.1.0                                ...           8 years ago
  • 4.0.4                                ...           8 years ago
  • 4.0.3                                ...           8 years ago
  • 3.1.5                                ...           8 years ago
  • 4.0.2                                ...           8 years ago
  • 4.0.1                                ...           8 years ago
  • 4.0.0                                ...           8 years ago
  • 4.0.0-beta.3                                ...           8 years ago
  • 4.0.0-beta.2                                ...           8 years ago
  • 4.0.0-beta.1                                ...           8 years ago
  • 3.1.4                                ...           8 years ago
  • 2.1.2                                ...           9 years ago
  • 0.2.2                                ...           9 years ago
  • 2.1.1                                ...           9 years ago
  • 2.1.0                                ...           9 years ago
  • 3.1.3                                ...           9 years ago
  • 3.1.2                                ...           9 years ago
  • 3.1.1                                ...           9 years ago
  • 3.1.0                                ...           9 years ago
  • 3.0.0                                ...           9 years ago
  • 0.2.1                                ...           9 years ago
  • 0.2.0                                ...           9 years ago
  • 0.1.6                                ...           9 years ago
  • 0.1.5                                ...           9 years ago
  • 0.1.4                                ...           9 years ago
  • 0.1.3                                ...           9 years ago
  • 0.1.2                                ...           9 years ago
  • 0.1.1                                ...           9 years ago
  • 0.1.0                                ...           9 years ago
  • 0.0.2                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 57
Last Day 0
Last Week 59
Last Month 9
Dependencies (13)
Dev Dependencies (3)

Copyright 2013 - present © cnpmjs.org | Home |