73kus-err/configuration/webpack.dev.config.js

39 lines
864 B
JavaScript
Raw Normal View History

2021-08-02 17:05:36 -04:00
/* eslint-disable import/no-extraneous-dependencies */
const { merge } = require('webpack-merge');
const webpackConfiguration = require('../webpack.config');
const environment = require('./environment');
module.exports = merge(webpackConfiguration, {
mode: 'development',
/* Manage source maps generation process */
devtool: 'eval-source-map',
/* Development Server Configuration */
devServer: {
contentBase: environment.paths.output,
watchContentBase: true,
publicPath: '/',
open: true,
historyApiFallback: true,
compress: true,
overlay: true,
hot: false,
watchOptions: {
poll: 300,
},
...environment.server,
},
/* File watcher options */
watchOptions: {
aggregateTimeout: 300,
poll: 300,
ignored: /node_modules/,
},
/* Additional plugins configuration */
plugins: [],
});