Created
February 23, 2020 22:47
-
-
Save ORESoftware/6e4a1640ad8ac49fc63dbdcf1da1fee0 to your computer and use it in GitHub Desktop.
Webpack middleware for loading incremental build from memory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!ignoreWebpack && !inProduction) | |
const webpack = require('webpack'); | |
const webpackMiddleware = require('webpack-dev-middleware'); | |
const WebpackDashboardPlugin = require('webpack-dashboard/plugin'); | |
const config = require('./webpack.config.dev'); | |
const compiler = webpack(config); | |
app.use(require("webpack-hot-middleware")(compiler)); | |
compiler.apply(new WebpackDashboardPlugin()); | |
app.use(webpackMiddleware(compiler, { publicPath: config.output.publicPath })); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment