Skip to content

Instantly share code, notes, and snippets.

@caseyWebb
Created February 7, 2018 03:04
Show Gist options
  • Save caseyWebb/dc95c85e3b5093f707fe46d456deb6a3 to your computer and use it in GitHub Desktop.
Save caseyWebb/dc95c85e3b5093f707fe46d456deb6a3 to your computer and use it in GitHub Desktop.
KnockoutJS HMR - Medium - 2
'use strict'
+ const { HotModuleReplacementPlugin, NamedModulesPlugin } = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
context: __dirname,
entry: './index.js',
output: './bundle.js',
+ devServer: {
+ hot: true
+ },
plugins: [
+ new NamedModulesPlugin(),
+ new HotModuleReplacementPlugin(),
new HtmlWebpackPlugin()
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment