-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
59 lines (52 loc) · 1.79 KB
/
webpack.config.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
50
51
52
53
54
55
56
57
58
59
const path = require('path')
let noopPath = path.join(__dirname, 'src/modules/shims/noop')
let emptyPath = path.join(__dirname, 'src/modules/shims/empty')
module.exports = () => ({
entry: './src/components/App.js',
output: {
filename: 'bundle.js',
path: __dirname
},
devtool: 'source-map',
module: {
rules: [
{
test: /\.sgf$/,
use: 'raw-loader'
},
{
test: /\.js$/,
use: {
loader: 'babel-loader',
options: {
presets: [['env', {modules: false}]]
}
}
}
]
},
resolve: {
alias: {
'react': path.join(__dirname, 'node_modules/preact/dist/preact.min'),
'preact': path.join(__dirname, 'node_modules/preact/dist/preact.min'),
'fs': path.join(__dirname, 'src/modules/shims/fs'),
'electron': path.join(__dirname, 'src/modules/shims/electron'),
'buffer': path.join(__dirname, 'src/modules/shims/buffer'),
'iconv-lite': path.join(__dirname, 'src/modules/shims/iconv-lite'),
'jschardet': path.join(__dirname, 'src/modules/shims/jschardet'),
'moment': emptyPath,
'uuid': emptyPath,
'recursive-copy': emptyPath,
'rimraf': emptyPath,
'argv-split': emptyPath,
'../modules/gtp': emptyPath,
'../menu': emptyPath,
'./ThemeManager': noopPath,
'./LeftSidebar': noopPath,
'./drawers/PreferencesDrawer': noopPath,
'./drawers/CleanMarkupDrawer': noopPath,
'./bars/AutoplayBar': noopPath,
'./bars/GuessBar': noopPath
}
}
})