webpack.dev.config.js 826 Bytes
'use strict';

const path = require('path');
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
let baseConfig = require('./webpack.base.config.js');

baseConfig = baseConfig('dev');
baseConfig.devtool = '#inline-source-map';
baseConfig.output.publicPath = 'http://localhost:5001/';
baseConfig.devServer = {
	host: '0.0.0.0',
    port: 5001,
	contentBase: [path.join(__dirname, '../'), path.join(__dirname, '../bundle/')],
    publicPath: baseConfig.output.publicPath,
    hot: true,
    inline: true,
    // quiet: true,
    // clientLogLevel: 'error',
    compress: true,
    stats: {
        colors: true
    },
    headers: {
        'Access-Control-Allow-Origin': '*'
    }
}

baseConfig.plugins.push(
    new webpack.HotModuleReplacementPlugin()
);

module.exports = baseConfig;