about summary refs log tree commit diff
path: root/config/webpack/development.server.js
blob: 4e11df4cb3a1ace2b79dade985ac2790ba188760 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Note: You must restart bin/webpack-dev-server for changes to take effect

const { resolve } = require('path');
const { env } = require('process');
const merge = require('webpack-merge');
const devConfig = require('./development.js');
const { devServer, publicPath, paths } = require('./configuration.js');

module.exports = merge(devConfig, {
  devServer: {
    host: env.LOCAL_DOMAIN ? '0.0.0.0' : devServer.host,
    port: devServer.port,
    headers: { "Access-Control-Allow-Origin": "*" },
    compress: true,
    historyApiFallback: true,
    contentBase: resolve(paths.output, paths.entry),
    publicPath,
    disableHostCheck: true,
  },
});