-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.ts
25 lines (24 loc) · 842 Bytes
/
index.ts
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
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
require('@babel/register')();
// Used by react-refresh
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
global.$RefreshReg$ = () => null;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
global.$RefreshSig$$ = () => () => null;
// Global variables for server-side
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
global.__CLIENT__ = false;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
global.__SERVER__ = true;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
global.__DEV__ = process.env.NODE_ENV === 'development';
// Run assets require hooks
require('./webpack/utils/hooks')();
// Run server
require('./src/server/index');