-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrsbuild.config.ts
39 lines (37 loc) · 968 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
import {defineConfig} from '@rsbuild/core';
import {pluginSvelte} from '@rsbuild/plugin-svelte';
import * as process from "node:process";
import { convert } from 'tsconfig-to-swcconfig';
const swcConfig = convert("tsconfig.json"); // This will look for tsconfig.json in the current directory
swcConfig.env = null;
export default defineConfig({
environments: {
// Configure the web environment for browsers
web: {
plugins: [
pluginSvelte()
],
source: {
entry: {
index: './src/index.ts'
}
},
output: {
target: 'web',
minify: process.env.NODE_ENV === 'production',
}
}
},
dev: {
hmr: false
},
tools: {
swc: swcConfig,
},
html: {
template: './static/index.html',
},
output: {
assetPrefix: './'
},
});