Commit 25a3ec09 authored by Jaden DIEFENBAUGH's avatar Jaden DIEFENBAUGH

prod needs diff publicpath without dev server & add es6-compat uglify

parent 8a07a16e
This diff is collapsed.
......@@ -4,6 +4,7 @@ var webpack = require('webpack')
const VisualizerPlugin = require('webpack-visualizer-plugin');
const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const dist = resolve(__dirname, 'dist');
......@@ -151,6 +152,7 @@ if(process.env.NODE_ENV === 'test'){
// PROD
// TODO: pull out into different webpack config
if (process.env.NODE_ENV === 'production') {
module.exports.output.publicPath = './';
// simpler source map alg
module.exports.devtool = 'source-map';
// use [hash] to prevent using stale caches
......@@ -167,6 +169,7 @@ if (process.env.NODE_ENV === 'production') {
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false
})
}),
new UglifyJsPlugin(),
].concat(module.exports.plugins);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment