Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gulp.task('serve', () => {
- const config = require('./config/webpack.dev.config');
- config.entry.app = [
- // this modules required to make HRM working
- // it responsible for all this webpack magic
- 'webpack-hot-middleware/client?reload=true',
- // application entry point
- ].concat(paths.entry);
- var compiler = webpack(config);
- serve({
- port: process.env.PORT || 3000,
- open: false,
- server: {baseDir: root},
- middleware: [
- historyApiFallback(),
- webpackDevMiddleware(compiler, {
- stats: {
- colors: colorsSupported,
- chunks: false,
- modules: false
- },
- publicPath: config.output.publicPath
- }),
- webpackHotMiddleware(compiler)
- ]
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement