Fix toggleHelp action, ignore moment locale (saves 100KB)

This commit is contained in:
David Kaltschmidt
2016-05-02 15:26:31 +02:00
parent eed779abfa
commit 2cfd3ffd46
3 changed files with 4 additions and 1 deletions

View File

@@ -25,8 +25,9 @@ export function toggleHelp() {
return (dispatch, getState) => {
if (getState().get('showingHelp')) {
dispatch(hideHelp());
} else {
dispatch(showHelp());
}
dispatch(showHelp());
};
}

View File

@@ -62,6 +62,7 @@ module.exports = {
new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new webpack.IgnorePlugin(/^\.\/locale$/, [/moment$/]),
new HtmlWebpackPlugin({
chunks: ['vendors', 'contrast-app'],
template: 'app/html/index.html',

View File

@@ -87,6 +87,7 @@ module.exports = {
new webpack.DefinePlugin(GLOBALS),
new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'),
new webpack.optimize.OccurenceOrderPlugin(true),
new webpack.IgnorePlugin(/^\.\/locale$/, [/moment$/]),
new webpack.optimize.UglifyJsPlugin({
sourceMap: false,
compress: {