forked from decred/decrediton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
47 lines (43 loc) · 1.04 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
var webpack = require("webpack");
var webpackTargetElectronRenderer = require("webpack-target-electron-renderer");
var config = {
entry: [
"webpack-hot-middleware/client?reload=true&path=http://localhost:9000/__webpack_hmr",
"./app/app",
],
module: {
loaders: [{
test: /\.jsx?$/,
loaders: ["babel-loader"],
exclude: /node_modules/
},
{
test: /\.global\.css$/,
loaders: [
"style-loader",
"css-loader?sourceMap"
]
},
{
test: /^((?!\.global).)*\.css$/,
loaders: [
"style-loader",
"css-loader?modules&sourceMap&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]"
]
}]
},
output: {
path: __dirname + "/dist",
publicPath: "http://localhost:9000/dist/",
filename: "bundle.js"
},
resolve: {
extensions: ["", ".js", ".jsx"],
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
],
query: { presets: ["es2015"] },
};
config.target = webpackTargetElectronRenderer(config);
module.exports = config;