-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrstack.config.ts
More file actions
68 lines (62 loc) · 1.19 KB
/
Copy pathrstack.config.ts
File metadata and controls
68 lines (62 loc) · 1.19 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// Configuration guide: https://rstack.rs/config
import { define } from 'rstack';
define.lib(async () => {
const { pluginPublint } = await import('rsbuild-plugin-publint');
return {
lib: [
{
format: 'esm',
syntax: 'es2023',
dts: {
bundle: true,
tsgo: true,
},
output: {
distPath: {
root: './dist/esm',
},
},
},
{
format: 'cjs',
syntax: 'es2023',
dts: {
bundle: true,
tsgo: true,
},
output: {
distPath: {
root: './dist/cjs',
},
},
},
],
source: {
entry: {
index: './src/index.ts',
},
},
output: {
target: 'node',
},
plugins: [pluginPublint()],
};
});
define.test({
include: ['./src/**/*.test.ts', './e2e/**/*.test.ts'],
});
define.lint(({ ts }) => [
ts.configs.recommended,
{
rules: {
'no-control-regex': 'off',
},
},
]);
define.fmt({
singleQuote: true,
});
define.staged({
'*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}': ['rs lint --fix', 'rs fmt'],
'*.{json,md,mdx,css,scss,less,html,yml,yaml}': 'rs fmt',
});