-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
executable file
·49 lines (41 loc) · 987 Bytes
/
app.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env node
const config = require('./config/webpack/development')
const v8 = require('v8')
const webpack = require('webpack')
const WebpackDevServer = require('webpack-dev-server')
v8.setFlagsFromString('--max-old-space-size=8192')
const {
PORT: port = 3636,
} = process.env
const OPTIONS = {
disableHostCheck: true,
historyApiFallback: true,
host: '0.0.0.0',
hot: true,
index: 'index.html',
injectClient: true,
injectHot: true,
overlay: {
errors: true,
warnings: false,
},
port,
public: 'com.ignota.here',
serveIndex: true,
// sockHost: 'com.ignota.here',
// sockPort: 443,
stats: 'minimal',
transportMode: 'ws',
watchOptions: {
ignored: [
/.git/,
/node_modules/,
],
},
}
WebpackDevServer.addDevServerEntrypoints(config, OPTIONS)
const compiler = webpack(config)
const server = new WebpackDevServer(compiler, OPTIONS)
server.listen(port, () => {
console.log(`Server listening on port: ${ port }!`)
})