-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
33 lines (29 loc) · 935 Bytes
/
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
let webpack = require('webpack');
module.exports = {
entry: './src/entry.js',
target: 'electron-renderer',
output: {
filename: 'bundle.js',
path: __dirname + '/app/app',
publicPath: process.env.NODE_ENV === 'development' ?
'http://localhost:8080/app/' : '../../app/app/'
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify(process.env.NODE_ENV)
}
})
],
module: {
loaders: [
{test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/},
{test: /\.json$/, loader: 'json-loader'},
{test: /\.s(c|a)ss$/, loader: 'style-loader!css-loader!sass-loader'},
{test: /\.woff/, loader: 'file?prefix=font/&limit=10000&mimetype=application/font-woff'},
{test: /\.ttf/, loader: 'file?prefix=font/'},
{test: /\.eot/, loader: 'file?prefix=font/'},
{test: /\.svg/, loader: 'file?prefix=font/'}
]
}
};