0.1.0 • Published 7 years ago

start-webpack-dev-server-hot v0.1.0

Weekly downloads
9
License
-
Repository
github
Last release
7 years ago

start-webpack-dev-server-hot

npm

Hot Module Replacement wrapper for start-webpack-dev-server

It does 3 things:

  1. Adds {hot: true} in devServerOptions
  2. Inserts HMR plugin in your webpack config: new webpack.HotModuleReplacementPlugin()
  3. Insert these 2 files in your entry point(s):

    'webpack/hot/dev-server',
    'webpack-dev-server/client?',

It basically achieves the same purpose as the webpack-dev-server's CLI switches --hot --inline

Install

npm install --save-dev start-webpack-dev-server-hot
# or
yarn add --dev start-webpack-dev-server-hot

Usage

import Start from 'start';
import reporter from 'start-pretty-reporter';
import webpackDevServerHot from 'start-webpack-dev-server-hot';

const start = Start(reporter());

export const dev = () => start(
  webpackDevServerHot(require('conf/webpack.dev'))
);

Arguments

Since it's basically a wrapper, it accepts the same arguments as start-webpack-dev-server.