-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathrslib.config.ts
55 lines (53 loc) · 1.02 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';
import pkg from './package.json';
const moduleName = 'cloud-utils';
const banner =
`/*!
* ${moduleName} v${pkg.version} (https://github.com/winjs-dev/cloud-utils)
* API https://winjs-dev.github.io/cloud-utils/
* Copyright 2017-${(new Date).getFullYear()} ${pkg.author.name}. All Rights Reserved
* Licensed under ${pkg.license} (https://github.com/winjs/cloud-utils/blob/master/LICENSE)
*/
`;
export default defineConfig({
lib: [
{
format: 'esm',
syntax: 'es5',
dts: true,
banner: {
js: banner
}
},
{
format: 'cjs',
syntax: 'es5',
dts: {
autoExtension: true
},
banner: {
js: banner
}
},
{
format: 'umd',
umdName: 'cloud-utils',
banner: {
js: banner
},
output: {
distPath: {
root: './dist/umd'
}
}
}
],
source: {
exclude: [
/src\/__tests__/
]
},
output: {
target: 'web'
}
});