Production build improvements
This commit is contained in:
49
dist/bundle.js
vendored
49
dist/bundle.js
vendored
File diff suppressed because one or more lines are too long
1
dist/bundle.js.map
vendored
1
dist/bundle.js.map
vendored
@@ -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":""}
|
|
||||||
24
src/index.js
24
src/index.js
@@ -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: [
|
||||||
|
|||||||
@@ -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/'
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user