-
Notifications
You must be signed in to change notification settings - Fork 2k
/
index.js
26 lines (24 loc) · 663 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
* Entry Script
*/
if (process.env.NODE_ENV === 'production') {
process.env.webpackAssets = JSON.stringify(require('./dist/manifest.json'));
process.env.webpackChunkAssets = JSON.stringify(require('./dist/chunk-manifest.json'));
// In production, serve the webpacked server file.
require('./dist/server.bundle.js');
} else {
// Babel polyfill to convert ES6 code in runtime
require('babel-register')({
"plugins": [
[
"babel-plugin-webpack-loaders",
{
"config": "./webpack.config.babel.js",
"verbose": false
}
]
]
});
require('babel-polyfill');
require('./server/server');
}