Skip to content

Instantly share code, notes, and snippets.

@merss19
Created March 22, 2017 17:55
Show Gist options
  • Save merss19/815d3ff60a1a475a426df8a76af384c7 to your computer and use it in GitHub Desktop.
Save merss19/815d3ff60a1a475a426df8a76af384c7 to your computer and use it in GitHub Desktop.
const webpackMerge = require('webpack-merge');
const webpack = require('webpack')
const commonConfig = require('./base.js');
const path = require('path')
const publicPath = '/'
process.env.NODE_ENV = 'development';
module.exports = function (env) {
console.log('dev')
console.log(env)
return webpackMerge(commonConfig(), {
devtool: 'cheap-module-source-map',
plugins: [
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('development'),
'BABEL_ENV': JSON.stringify('development')
}
})
],
devServer: {
port: 3000,
host: 'localhost',
historyApiFallback: true,
noInfo: false,
stats: 'minimal',
publicPath: publicPath
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment