-
-
Notifications
You must be signed in to change notification settings - Fork 393
Expand file tree
/
Copy pathrslib.config.ts
More file actions
52 lines (50 loc) · 1.03 KB
/
rslib.config.ts
File metadata and controls
52 lines (50 loc) · 1.03 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
import { defineConfig } from '@rslib/core';
import { readFileSync } from 'fs';
import { join } from 'path';
import { pluginPublint } from 'rsbuild-plugin-publint';
const pkg = JSON.parse(
readFileSync(join(process.cwd(), 'package.json'), 'utf-8'),
);
export default defineConfig({
plugins: [pluginPublint()],
lib: [
{
format: 'cjs',
autoExtension: true,
syntax: 'es2021',
bundle: false,
outBase: 'src',
dts: {
bundle: false,
distPath: './dist',
},
},
],
source: {
entry: {
index: [
'./src/**/*.{ts,tsx,js,jsx}',
'!./src/**/*.spec.*',
'!./src/**/*.test.*',
],
},
define: {
__VERSION__: JSON.stringify(pkg.version),
},
tsconfigPath: './tsconfig.lib.json',
},
output: {
target: 'node',
minify: false,
distPath: {
root: './dist',
},
externals: [/@module-federation\//, 'commander', 'chalk', 'jiti'],
copy: [
{
from: './LICENSE',
to: '.',
},
],
},
});