-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
29 lines (22 loc) · 731 Bytes
/
index.js
File metadata and controls
29 lines (22 loc) · 731 Bytes
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
const debug = require('debug')('bootstrap');
debug('Enabling ES6 runtime transpiler');
require('babel-core/register');
const WebpackIsomorphicTools = require('webpack-isomorphic-tools');
const isomorphicConfig = require('./config/isomorphic.config');
const appConfig = require('./src/config');
if (appConfig.isDevelopment) {
if (!require('piping')({
hook: true,
ignore: /(\/\.|~$|\.json)/i
})) {
return;
}
}
debug('Bundling Webpack server-side…');
// Globalizing isomorphic tools
global.webpackIsomorphicTools = new WebpackIsomorphicTools(isomorphicConfig)
.development(appConfig.isDevelopment)
.server(__dirname, function() {
debug('Bundled Webpack server-side');
require("./src/server");
});