start-webpack-dev-server-hot

0.1.0 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i start-webpack-dev-server-hot

Weekly Downloads

3

Version

0.1.0

License

none

Last publish

Collaborators

  • laggingreflex