forked from microsoft/vscode-edge-devtools-network
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.ts
More file actions
51 lines (49 loc) · 1.28 KB
/
webpack.config.ts
File metadata and controls
51 lines (49 loc) · 1.28 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
import path from "path";
const commonConfig = {
devtool: "source-map",
mode: "development",
module: {
rules: [
{
exclude: /node_modules/,
test: /\.tsx?$/,
use: "ts-loader",
},
],
},
resolve: {
extensions: [".tsx", ".ts", ".js"],
},
};
module.exports = [
{
...commonConfig,
entry: {
host: "./src/host/mainHost.ts",
messaging: "./src/host/mainMessaging.ts",
},
name: "host",
output: {
filename: "[name].bundle.js",
path: path.resolve(__dirname, "out/host"),
},
},
{
...commonConfig,
entry: {
extension: "./src/extension.ts",
},
externals: {
vscode: "commonjs vscode",
},
name: "extension",
output: {
devtoolModuleFilenameTemplate: "../[resource-path]",
filename: "[name].js",
libraryTarget: "commonjs2",
path: path.resolve(__dirname, "out"),
},
stats: "errors-only", // Bug ws package includes dev-dependencies which webpack will report as warnings
target: "node",
},
];