Moved config files to a separate folder

This commit is contained in:
Jori Lallo
2018-01-03 16:58:34 -08:00
parent 686c237e36
commit 7a7f8f7c53
6 changed files with 13 additions and 15 deletions

View File

@@ -1,44 +0,0 @@
/* eslint-disable */
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
commonWebpackConfig = require('./webpack.config');
productionWebpackConfig = Object.assign(commonWebpackConfig, {
cache: true,
devtool: 'source-map',
entry: ['babel-polyfill', 'babel-regenerator-runtime', './app/index'],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.[hash].js',
publicPath: '/static/',
},
});
productionWebpackConfig.plugins.push(
new HtmlWebpackPlugin({
template: 'server/static/index.html',
})
);
productionWebpackConfig.plugins.push(
new ExtractTextPlugin({ filename: 'styles.[hash].css' })
);
productionWebpackConfig.plugins.push(
new webpack.optimize.UglifyJsPlugin({
compress: {
sourceMap: true,
},
})
);
productionWebpackConfig.plugins.push(
new webpack.DefinePlugin({
'process.env': {
URL: JSON.stringify(process.env.URL),
NODE_ENV: JSON.stringify('production'),
GOOGLE_ANALYTICS_ID: JSON.stringify(process.env.GOOGLE_ANALYTICS_ID),
},
})
);
module.exports = productionWebpackConfig;