-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathrspack.config.js
More file actions
39 lines (37 loc) · 869 Bytes
/
rspack.config.js
File metadata and controls
39 lines (37 loc) · 869 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
import { defineConfig } from "@rspack/cli";
import { join } from "node:path";
import { fileURLToPath } from "node:url";
const __dirname = fileURLToPath(new URL(".", import.meta.url));
export default defineConfig({
mode: "development",
entry: {
codecs: join(__dirname, "src/codecs/index.ts"),
config: join(__dirname, "src/config/index.ts"),
rewrite: join(__dirname, "src/rewrite/index.ts"),
worker: join(__dirname, "src/worker/index.ts"),
client: join(__dirname, "src/client/index.ts"),
},
output: {
filename: "eclipse.[name].js",
path: join(__dirname, "dist"),
clean: true,
},
watch: true,
module: {
rules: [
{
test: /\.ts$/,
exclude: [/node_modules/],
loader: "builtin:swc-loader",
options: {
jsc: {
parser: {
syntax: "typescript",
},
},
},
type: "javascript/auto",
},
],
},
});