forked from ahqsoftwares/tauri-ahq-store
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrsbuild.config.ts
47 lines (46 loc) · 891 Bytes
/
rsbuild.config.ts
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
47
import { defineConfig } from "@rsbuild/core";
import { pluginSvgr } from "@rsbuild/plugin-svgr";
import { pluginBabel } from "@rsbuild/plugin-babel";
import { pluginReact } from "@rsbuild/plugin-react";
export default defineConfig({
plugins: [
pluginReact(),
pluginBabel({
include: /\.(?:jsx|tsx)$/,
babelLoaderOptions(opts) {
opts.plugins?.unshift("babel-plugin-react-compiler");
},
}),
pluginSvgr(),
],
html: {
template: "./index.html",
},
source: {
entry: {
index: "./src/index.tsx",
},
alias: {
"@": "./src",
"@lib": "./src/app/resources",
"@/*": "./src/*",
},
},
output: {
distPath: {
root: "build",
},
minify: {
css: true,
js: true,
},
},
dev: {
hmr: true,
liveReload: true
},
server: {
port: 3000,
strictPort: true,
},
});