devServer: {
host,
port,
hot: true,
allowedHosts: 'all',
devMiddleware: {
publicPath: '/',
stats: { colors: true },
},
client: {
overlay: {
runtimeErrors: error => {
console.log(error);
return false;
},
},
},
headers: {
'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept, Cache-Control',
'Access-Control-Allow-Methods': 'GET, PUT, POST, OPTIONS',
'Access-Control-Allow-Credentials': 'true',
'Access-Control-Allow-Origin': '*',
},
static: `${path.resolve(__dirname)}/../assets/`,
},