@webpack-blocks/dev-server2

0.4.0 • Public • Published

Webpack blocks - Webpack Dev Server for Webpack 2

JavaScript Style Guide NPM Version

This is the dev-server block providing webpack dev server configuration.

Usage

const { createConfig, env } = require('@webpack-blocks/webpack')
const devServer = require('@webpack-blocks/dev-server')

module.exports = createConfig([
  // use only if `NODE_ENV === 'development'`:
  env('development', [
    devServer(),
    // if you need to proxy API requests:
    devServer.proxy({
      '/api': { target: 'http://localhost:3000' }
    }),
    // in case you are using react-hot-loader 2.x:
    // (need to install `react-hot-loader` package manually, though)
    devServer.reactHot()
  ])
])

Webpack blocks

Check out the

👉 Main Documentation

Released under the terms of the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i @webpack-blocks/dev-server2

Weekly Downloads

677

Version

0.4.0

License

MIT

Last publish

Collaborators

  • webpack-blocks-andy
  • andywer