-
Notifications
You must be signed in to change notification settings - Fork 51
/
webpack.config.contactAdder.js
47 lines (41 loc) · 1.04 KB
/
webpack.config.contactAdder.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
import path from 'path'
import webpack from 'webpack'
import merge from 'webpack-merge'
import baseConfig from './webpack.config.base'
export default merge(baseConfig, {
devtool: 'cheap-module-source-map',
entry: ['babel-polyfill', './app/main.contactAdder'],
output: {
path: path.resolve(__dirname, 'app'),
filename: 'contactAdder.js',
},
module: {
rules: [
{
test: /\.jsx?$/,
use: [
{ loader: 'babel-loader' },
{ loader: `ifdef-loader?json={"isElectron":${false}}` },
],
exclude: /node_modules/
},
]
},
plugins: [
/**
* Create global constants which can be configured at compile time.
*
* Useful for allowing different behaviour between development builds and
* release builds
*
* NODE_ENV should be production so that modules do not perform certain
* development checks
*/
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production')
}
})
],
target: 'node',
});