1.0.6 • Published 9 years ago

koa-webpack-dev v1.0.6

Weekly downloads
14
License
MIT
Repository
github
Last release
9 years ago

koa-webpack-dev

A koa middleware works as development server for webpack. Well tested.

Usage

  • Koa v1.x

    const webpackDevServer = require('koa-webpack-dev');
    app.use(webpackDevServer(settings));

Install

npm install koa-webpack-dev

Features

  • Can be integrated into your koa application as easy as using a serveStatic middleware. Just don't use it in production mode.

Example

var koa = require('koa');
var webpackDevServer = require('koa-webpack-dev');
var app = koa();

app.use(webpackDevServer({
    config: './webpack.config.js'
}));

app.listen(2333);

Settings

  • options:
    • config: can be the content of webpack.config.js or a string specified the path of webpack.config.js
    • watchOptions: options to be passed into the watch api of webpack. webpack#watching
    • defaultPage: default entry page for url mapped to a directory. default: index.html
    • webRoot: web root path. default: build path

Licences

MIT

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago