Skip to content

Commit

Permalink
webpack updates, over and out, howdy!/0
Browse files Browse the repository at this point in the history
  • Loading branch information
rtbm committed May 15, 2016
1 parent d0b4620 commit cb7efc8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/boot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'core-js/es7/reflect';
require('zone.js/dist/zone');
import 'ts-helpers';

import {enableProdMode} from '@angular/core';
import {bootstrap} from '@angular/platform-browser-dynamic';
import {createStore, applyMiddleware} from 'redux';
import {provider} from 'ng2-redux';
Expand All @@ -25,16 +26,18 @@ const stateTransformer = (state) => {
return newState;
};

const logger = require('redux-logger')({
/*const logger = require('redux-logger')({
level: 'info',
collapsed: true,
stateTransformer
});
});*/

const store = applyMiddleware(thunk, logger)(createStore)(rootReducer, {});
const store = applyMiddleware(thunk/*, logger*/)(createStore)(rootReducer, {});

import {AppComponent} from './app';

enableProdMode();

bootstrap(AppComponent, [
provider(store),
SocketService,
Expand Down
9 changes: 9 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,21 @@ module.exports = {
},

plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"production"'
}),
new SplitByPathPlugin([
{name: 'vendor', path: [__dirname + '/node_modules/']}
]),
new HtmlWebpackPlugin({
template: './src/index.html',
inject: 'body'
}),
new webpack.optimize.UglifyJsPlugin({
mangle: true,
compress: {
warnings: false,
}
})
],

Expand Down

0 comments on commit cb7efc8

Please sign in to comment.