-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
35 lines (28 loc) · 908 Bytes
/
webpack.config.js
File metadata and controls
35 lines (28 loc) · 908 Bytes
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
const path = require("path"),
CopyWebpackPlugin = require("copy-webpack-plugin"),
webpack = require("webpack");
module.exports = {
target: "electron-renderer",
entry: {
index: "./lib/js/src/react/index.js",
},
output: {
path: path.resolve("./html"),
filename: "js/[name].js",
},
plugins: [
new webpack.DefinePlugin({ "global.GENTLY": false }),
new CopyWebpackPlugin([{
from: "node_modules/font-awesome/css",
to: "css"
}, {
from: "node_modules/font-awesome/fonts",
to: "fonts"
}, {
from: "src/**/*.js",
to: path.resolve("./lib/js/[path][name].js")
}]),
new webpack.NormalModuleReplacementPlugin(/^any-promise$/, path.resolve("./node_modules/promise-monofill")),
],
devtool: "source-map",
};