ssr-fatigue-hmr
v1.1.0-alpha.19
Published
An Express middleware for setting up webpack dev/hot middlewares.
Downloads
2
Readme
ssr-fatigue-hmr
An Express middleware for setting up webpack dev/hot middlewares.
Installation
$ npm i -D ssr-fatigue-hmr
Usage
const express = require('express')
const webpackHMR = require('ssr-fatigue-hmr')
const webpackConfig = require.resolve('../webpack.config.js')
if (process.env.NODE_ENV === 'development') {
app.use(
webpackHMR({
webpackConfig,
publicPath: '/inc/', // mount point of build assets
})
)
}
app.use('/inc', express.static(path.resolve(__dirname, '..', 'build')))