1.0.6 • Published 4 years ago

webpack-hmr-sourcemaps v1.0.6

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

Purpose

NB: Only use this plugin when serving a NodeJS app from Webpack HMR

When using webpack HMR, if you want source maps, you have two options: - devtool: 'source-map' or equivalent => takes a long time to recompile (when watching changes) - devtool: 'eval-source-maps' or equivalent => broken stacktraces, wrong files in maps.

Usage

DO NOT REGISTER source-map-support when using this plugin.

const webpack = require('webpack');
const HmrEvalSourceMapDevToolPlugin = require('webpack-hmr-sourcemaps');

module.exports = {
    // [...]
    devtool: prod ? 'source-map' : false,
    plugins: [
        ...prod ? [] : [
            new webpack.HotModuleReplacementPlugin(),
            new HmrEvalSourceMapDevToolPlugin({
                columns: true,
                module: true,
            })
        ],
    ]
}
1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago