forked from zhandouxiaojiji/behavior3editor
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
52 lines (44 loc) · 1.16 KB
/
webpack.config.js
File metadata and controls
52 lines (44 loc) · 1.16 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
const CopyPlugin = require("copy-webpack-plugin");
module.exports = {
mode: "development",
entry: {
"bundle": ["./render-process/index.tsx"],
"main": ["./main-process/MainProcess.tsx"]
},
output: {
filename: "[name].js",
path: __dirname + "/dist"
},
devtool: "source-map",
resolve: {
extensions: [".ts", ".tsx", ".js", ".json"]
},
module: {
rules: [
{ test: /\.tsx?$/, loader: "ts-loader" },
{ test: /\.(jpe?g|png|gif|svg)$/i, loader: "file-loader" },
{ enforce: "pre", test: /\.js$/, loader: "source-map-loader" },
{
test: /\.less$/,
include: /node_modules/,
loaders: ['style-loader','css-loader','less-loader']
},
{
test: /\.css$/,
loaders: ['style-loader', 'css-loader']
},
{//https://github.com/ashtuchkin/iconv-lite/issues/205
test: /node_modules[\/\\](iconv-lite)[\/\\].+/,
resolve: {
aliasFields: ['main']
}
},
]
},
plugins: [
],
target: "electron-renderer",
externals: [{
'electron-reload': 'require("electron-reload")'
}]
};