-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
35 lines (35 loc) · 1022 Bytes
/
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
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
devtool: "inline-source-map",
mode: "development",
entry: {
foreground: path.resolve(__dirname, "src", "foreground.ts"),
inject_buttons: path.resolve(__dirname, "src", "inject_buttons.tsx"),
contentScript: path.resolve(__dirname, "src", "contentScript.ts"),
content: path.resolve(__dirname, "public", "content"),
worker: path.resolve(__dirname, "src", "worker.ts"),
extension_popup: path.resolve(__dirname, "src", "extension_popup.ts"),
},
output: {
path: path.join(__dirname, "dist"),
filename: "[name].js",
},
resolve: {
extensions: [".ts", ".js", ".tsx"],
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
exclude: /node_modules/,
},
],
},
plugins: [
new CopyPlugin({
patterns: [{from: ".", to: ".", context: "public"}]
}),
],
};