Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const express = require('express');
- const app = express();
- const {NODE_ENV} = process.env;
- module.exports = function(nodecg) {
- if (NODE_ENV !== 'production') {
- const webpack = require('webpack');
- const webpackConfig = require('../webpack.dev.config');
- const devMiddleware = require('webpack-dev-middleware');
- const compiler = devMiddleware(webpack(webpackConfig), {
- publicPath: webpackConfig.output.publicPath,
- stats: {colors: true},
- log: nodecg.log
- });
- app.use(compiler);
- }
- nodecg.mount(app);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement