1.0.3 • Published 6 years ago

webpack-dev-koa-middleware v1.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

webpack-dev-koa-middleware

The dev middleware for webpack 4.x

How to use ?

const koaDevMiddleware = require('webpack-dev-koa-middleware')

const config = {} // your's webpack config

const compiler = webpack(config)

const devMiddleware = koaDevMiddleware(compiler, {
  publicPath: clientConfig.output.publicPath,
  logLevel: 'silent'
})

compiler.plugin('done', (stats) => {
  // stats and errors code ...
  
  // for example: vue ssr ready manifest to memoryfs
  clientManifest = JSON.parse(readFile(
    // Here, you can use the fileSystem
    devMiddleware.fileSystem,
    'vue-ssr-client-manifest.json'
  ))
  
  update()
})

app.use(devMiddleware.middleware)
1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago