Production build improvements

This commit is contained in:
Jori Lallo
2016-05-22 22:41:57 -07:00
parent bc8200b30b
commit fd79d11479
4 changed files with 16 additions and 60 deletions

49
dist/bundle.js vendored

File diff suppressed because one or more lines are too long

1
dist/bundle.js.map vendored
View File

@@ -1 +0,0 @@
{"version":3,"file":"bundle.js","sources":["webpack:///bundle.js","webpack:///"],"mappings":"AAAA;ACwwHA;AAy/EA;AAyiFA;AA28FA;AAr1IA;AA45IA;;;;;AAo9GA;;;;;AAglFA;AAg7GA;;;;;;;;;;;;;;AAgxCA;AA+rHA;AA8pEA;AAklEA;AAmqEA;AA0gEA;AAowFA;AAunIA;AAytEA;AAgiEA;AA0gDA;AA4hJA;AAskEA;AA2jIA;AAmpHA;AAu4FA;AA2wEA","sourceRoot":""}

View File

@@ -28,15 +28,21 @@ import DocumentScene from 'scenes/DocumentScene';
import SlackAuth from 'scenes/SlackAuth'; import SlackAuth from 'scenes/SlackAuth';
// Redux // Redux
if (process.env.PRODUCTION) {
const loggerMiddleware = createLogger(); const routerMiddlewareWithHistory = routerMiddleware(History);
const routerMiddlewareWithHistory = routerMiddleware(History); const store = createStore(reducers, applyMiddleware(
thunkMiddleware,
const store = createStore(reducers, applyMiddleware( routerMiddlewareWithHistory,
thunkMiddleware, ), autoRehydrate());
routerMiddlewareWithHistory, } else {
loggerMiddleware, const loggerMiddleware = createLogger();
), autoRehydrate()); const routerMiddlewareWithHistory = routerMiddleware(History);
const store = createStore(reducers, applyMiddleware(
thunkMiddleware,
routerMiddlewareWithHistory,
loggerMiddleware,
), autoRehydrate());
}
persistStore(store, { persistStore(store, {
whitelist: [ whitelist: [

View File

@@ -11,7 +11,7 @@ productionWebpackConfig = Object.assign(commonWebpackConfig, {
], ],
output: { output: {
path: path.join(__dirname, 'dist'), path: path.join(__dirname, 'dist'),
filename: 'bundle.js', filename: 'bundle.[hash].js',
publicPath: '/static/' publicPath: '/static/'
}, },
}); });