-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.ts
37 lines (35 loc) · 1.04 KB
/
rollup.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
import { configureable, Testable } from '@baleada/prepare'
import { toIconRenderFunction } from './source-transforms/toIconRenderFunction'
const external = [
'vue',
'vue-router',
'pinia',
'@baleada/logic',
'@baleada/vue-composition',
'@baleada/vue-features',
],
shared = new configureable.Rollup()
.external(external)
.input('src/index.ts')
.resolve()
.sourceTransform({
test: param => new Testable().include(/(@primer\/octicons|simple-icons|src\/icons)/).test(param),
transform: toIconRenderFunction,
})
.vue()
.esbuild(),
esm = shared
.delete({ targets: 'lib/*', verbose: true })
.esm({ file: 'lib/index.js', target: 'browser' })
.analyzer()
.configure(),
dts = new configureable.Rollup()
.input('types/index.d.ts')
.external(external)
.output({ file: 'lib/index.d.ts', format: 'esm' })
.dts()
.configure()
export default [
esm,
dts,
]