-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathrspack.config.mjs
More file actions
46 lines (45 loc) · 963 Bytes
/
rspack.config.mjs
File metadata and controls
46 lines (45 loc) · 963 Bytes
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
// @ts-check
/** @type {import("@rspack/core").Configuration} */
export default {
entry: {
main: "./src/index.ts",
},
experiments: {
inlineEnum: true,
},
mode: "production",
optimization: {
// disable minimize so you can understand the output
minimize: false,
},
resolve: {
extensions: [".ts", "..."],
},
module: {
rules: [
{
test: /\.ts$/,
use: {
loader: "builtin:swc-loader",
/** @type {import("@rspack/core").SwcLoaderOptions} */
options: {
jsc: {
parser: {
syntax: "typescript",
},
transform: {
tsEnumIsMutable: true,
}
},
rspackExperiments: {
collectTypeScriptInfo: {
exportedEnum: 'const-only',
}
}
},
},
type: "javascript/auto",
},
],
},
};