This repository was archived by the owner on Apr 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebpack.config.js
More file actions
63 lines (58 loc) · 1.51 KB
/
webpack.config.js
File metadata and controls
63 lines (58 loc) · 1.51 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
const webpack = require("webpack");
var WatchIgnorePlugin = require('watch-ignore-webpack-plugin');
const path = require("path");
module.exports = {
entry: {
app: ["webpack/hot/dev-server", "./app/components/index.js"]
},
output: {
path: "./public/built",
filename: "bundle.js",
publicPath: "http://localhost:8080/built/"
},
devServer: {
contentBase: "./public",
publicPath: "http://localhost:8080/built/"
},
module: {
loaders: [
{
test: /\.jsx?$/,
loader: "babel-loader",
exclude: /node_modules/,
},
{
test: /\.node$/,
loader: "node-loader"
},
{test: /\.css$/, loader: "style-loader!css-loader"},
{test: /\.less$/, loader: "style-loader!css-loader!less-loader"},
{test: /\.json$/, loader: 'raw-loader'}
]
},
node: {
net: "empty",
tls: "empty"
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.IgnorePlugin(new RegExp("^(ipc)$")),
new webpack.ExternalsPlugin('commonjs', [
'fs',
'desktop-capturer',
'electron',
'ipc-main',
'ipc-renderer',
'native-image',
'remote',
'web-frame',
'clipboard',
'crash-reporter',
'screen',
'shell'
]),
new WatchIgnorePlugin([
path.resolve(__dirname, './app/utils/preferences/preferences.json'),
]),
]
};