-
Notifications
You must be signed in to change notification settings - Fork 11
/
webpack.config.js
45 lines (42 loc) · 1.08 KB
/
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
36
37
38
39
40
41
42
43
44
45
const path = require("path");
// const fs = require("fs");
// class DeleteTsPlugin {
// apply(compiler) {
// compiler.hooks.done.tap("Delete Typescript Result Plugin", (stats) => {
// fs.rmdirSync(path.resolve(__dirname, "dist", "ts_dist"), {recursive: true})
// })
// }
// }
let mode = "development";
module.exports = {
mode,
entry: "./src/index.ts",
output: {
path: path.resolve(__dirname, "dist"),
filename: "index.js",
library: "genshinPanel",
libraryTarget: "umd",
globalObject: "this",
},
module: {
rules: [
{
test: /\.ts$/,
use: "ts-loader",
exclude: /node_modules|(\.d\.ts$)/,
// exclude: /node_modules/,
},
{
test: /\.d\.ts$/,
use: "ignore-loader"
}
]
},
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
// plugins: [new DeleteTsPlugin()]
// optimization: {
// runtimeChunk: true,
// }
}