JSPM

webpack-module-hot-accept

1.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 303
  • Score
    100M100P100Q109409F
  • License MIT

Tiny webpack plugin that adds `module.hot.accept` to the bottom of modules. Use with something like [`babel-plugin-react-hot`](https://github.com/loggur/babel-plugin-react-hot).

Package Exports

  • webpack-module-hot-accept

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (webpack-module-hot-accept) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

webpack-module-hot-accept

Tiny webpack plugin that adds module.hot.accept to the bottom of modules if module.hot is not already present.

Installation

npm install webpack-module-hot-accept --save-dev

Usage

// webpack.config.js

var webpack = require('webpack');

module.exports = {
  entry: [
    'webpack/hot/only-dev-server',
    './entry.js'
  ],
  output: {
    filename: 'bundle.js'
  },
  plugins: [
    new webpack.NoErrorsPlugin()
  ],
  module: {
    loaders: [
      {
        test: /\.jsx?$/,
        exclude: /node_modules/,
        loaders: [
          'babel',
          'webpack-module-hot-accept' // add this last
        ]
      }
    ]
  }
};