-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
38 lines (33 loc) · 1.2 KB
/
index.js
File metadata and controls
38 lines (33 loc) · 1.2 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
require('@babel/register')({
presets: [
["@babel/preset-env", {
}],
"@babel/preset-react",
],
plugins: [
["@babel/plugin-proposal-decorators", { "legacy": true }],
"@babel/plugin-proposal-class-properties",
"syntax-trailing-function-commas",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-transform-react-constant-elements",
"@babel/plugin-transform-react-inline-elements"
],
ignore: [/node_modules\/(?!(apollo-client)\/).*/],
});
require('isomorphic-fetch');
const isomorphicConfig = require('./webpack/webpack-isomorphic-tools');
const DEVELOPMENT = process.env.NODE_ENV !== 'production';
if (DEVELOPMENT) {
if (!require('piping')({ // eslint-disable-line global-require
hook: true,
ignore: /(\/\.|~$|\.json|client|components|\.scss|\.log$)/i,
})) {
return;
}
}
const WebpackIsomorphicTools = require('webpack-isomorphic-tools');
global.webpackIsomorphicTools = new WebpackIsomorphicTools(isomorphicConfig).server(__dirname, () => {
const Server = require('./src/server').default; // eslint-disable-line global-require
const server = new Server();
server.start();
});