Skip to content

Instantly share code, notes, and snippets.

@ricca509
Last active December 4, 2016 21:43
Show Gist options
  • Save ricca509/ddf0f9905c61201d464ca3c619e088a8 to your computer and use it in GitHub Desktop.
Save ricca509/ddf0f9905c61201d464ca3c619e088a8 to your computer and use it in GitHub Desktop.
const path = require('path');
const merge = require('webpack-merge');
const devConfig = require('./webpack.dev.config');
const prodConfig = require('./webpack.prod.config');
var config;
const common = {
entry: {
app: './app'
},
output: {
path: './build',
filename: '[name].js'
}
};
switch(process.env.NODE_ENV) {
case 'development':
config = merge(common, devConfig);
break;
default:
config = merge(common, prodConfig);
}
module.exports = config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment