-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.ui.dev.js
50 lines (40 loc) · 1.22 KB
/
webpack.config.ui.dev.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
'use strict';
var webpack = require('webpack');
var path = require('path');
var assign = require('object-assign');
var config = require('c0nfig');
var webpackTargetElectronRenderer = require('webpack-target-electron-renderer');
var baseConfig = require('./webpack.config.base');
var hotReloadUrl = config.hotReloadUrl;
var hotReloadPort = config.hotReloadPort;
var config = assign(baseConfig, {
hotReloadPort: hotReloadPort,
devtool: 'cheap-module-eval-source-map',
entry: [
'webpack-dev-server/client?' + hotReloadUrl,
'webpack/hot/only-dev-server',
'./src/ui/app'
],
output: {
path: path.join(__dirname, 'public', 'build'),
filename: 'bundle.js',
publicPath: hotReloadUrl,
libraryTarget: 'commonjs2'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loaders: ['react-hot', 'babel?stage=0']
}, {
test: /\.css$/,
loaders: ['style', 'css', 'cssnext']
}]
}
});
config.target = webpackTargetElectronRenderer(config);
module.exports = config;