-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrslib.config.ts
55 lines (54 loc) · 1.28 KB
/
rslib.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
48
49
50
51
52
53
54
55
import { defineConfig } from '@rslib/core';
export default defineConfig({
lib: [
{
format: 'esm',
syntax: ['node 16'],
dts: {
bundle: false,
distPath: './dist-types',
},
output: {
minify: {
jsOptions: {
minimizerOptions: {
mangle: false,
minify: false,
compress: {
defaults: false,
unused: true,
dead_code: true,
toplevel: true,
// fix `Couldn't infer stack frame for inline snapshot` error
// should keep function name used to filter stack trace
keep_fnames: true,
},
format: {
comments: 'some',
preserve_annotations: true,
},
},
},
},
},
source: {
entry: {
public: './src/public.ts',
node: './src/node.ts',
cli: './src/cli/index.ts',
worker: './src/runtime/worker/index.ts',
},
define: {
RSTEST_VERSION: JSON.stringify(require('./package.json').version),
},
},
},
],
tools: {
rspack: {
watchOptions: {
ignored: /\.git/,
},
},
},
});