forked from SabakiHQ/Sabaki
-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
46 lines (39 loc) · 1 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
const path = require('path')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
module.exports = (env, argv) => ({
entry: './src/components/App.js',
output: {
filename: 'bundle.js',
path: __dirname
},
devtool: 'source-map',
target: 'electron-renderer',
module: {
rules: [
{
test: /\.sgf$/,
use: 'raw-loader'
}
]
},
resolve: {
alias: {
'react': path.join(__dirname, 'node_modules/preact/dist/preact.min'),
'preact': path.join(__dirname, 'node_modules/preact/dist/preact.min'),
'prop-types': path.join(__dirname, 'src/modules/shims/prop-types')
}
},
externals: {
'moment': 'null'
},
optimization: {
minimize: argv.mode === 'production',
minimizer: [
new UglifyJsPlugin({
uglifyOptions: {
compress: false
}
})
]
}
})