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

38 lines
864 B
JavaScript

/* 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: {
static: {
directory: environment.paths.output,
staticOptions: {},
publicPath: "/",
serveIndex: true,
watch: true,
},
open: true,
historyApiFallback: true,
compress: true,
hot: false,
...environment.server,
},
/* File watcher options */
watchOptions: {
aggregateTimeout: 300,
poll: 300,
ignored: /node_modules/,
},
/* Additional plugins configuration */
plugins: [],
});