-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.mjs
More file actions
39 lines (37 loc) · 757 Bytes
/
Copy pathrollup.config.mjs
File metadata and controls
39 lines (37 loc) · 757 Bytes
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
import { defineConfig } from 'rollup'
import typescript from '@rollup/plugin-typescript'
import terser from '@rollup/plugin-terser'
import dts from 'rollup-plugin-dts'
const input = ['index.ts']
export default defineConfig([
{
input,
output: {
format: 'cjs',
file: 'dist/index.cjs',
},
plugins: [
typescript({ tsconfig: './tsconfig.json' }),
terser({ keep_classnames: true }),
],
},
{
input,
output: {
format: 'esm',
file: 'dist/index.mjs',
},
plugins: [
typescript({ tsconfig: './tsconfig.json' }),
terser({ keep_classnames: true }),
],
},
{
input,
output: {
format: 'esm',
file: 'dist/index.d.ts',
},
plugins: [dts()],
},
])