webpack.dev.config.js 780 Bytes
const merge = require('webpack-merge');
const webpack = require('webpack');
const path = require('path');
const devInfo = require('./dev-info.js');

let baseConfig = require('./webpack.base.config');

// baseConfig.entry.libs.push(path.join(__dirname, '../js/dev.js'));

module.exports = merge(baseConfig, {
    output: {
        publicPath: devInfo.publicPath,
        path: path.resolve(__dirname, 'bundle')
    },
    plugins: [
        new webpack.HotModuleReplacementPlugin()
    ],
    devServer: {
        contentBase: [path.join(__dirname, '../')],
        compress: true,
        port: devInfo.port,
        host: devInfo.host,
        hot: true,
        headers: {
            'Access-Control-Allow-Origin': '*'
        }
    },
    devtool: 'cheap-eval-source-map'
});