-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebpack.config.lite.js
37 lines (36 loc) · 1.01 KB
/
webpack.config.lite.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
36
37
const path = require("path");
const CopyPlugin = require("copy-webpack-plugin");
// const { CleanWebpackPlugin } = require("clean-webpack-plugin");
module.exports = {
entry: {
background: "./src-lite/background/background.ts",
content_script: "./src-lite/content-script/content-script.ts",
},
module: {
rules: [
{
test: /\.tsx?$/,
use: "ts-loader",
exclude: /node_modules/,
},
],
},
resolve: {
extensions: [".tsx", ".ts", ".js"],
},
output: {
filename: "[name]/[name].js",
path: path.resolve(__dirname, "dist-lite"),
},
plugins: [
// new CleanWebpackPlugin(),
new CopyPlugin([
{ from: "manifest.lite.json", to: "manifest.json" },
{ from: "src-lite/assets", to: "assets" },
{ from: "src-lite/_locales", to: "_locales" },
]),
],
// mode: "development",
mode: "production",
target: "web",
};