-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.mjs
More file actions
21 lines (20 loc) · 637 Bytes
/
rollup.config.mjs
File metadata and controls
21 lines (20 loc) · 637 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { defineConfig } from 'rollup';
import typescript from '@rollup/plugin-typescript';
import dts from 'rollup-plugin-dts';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
export default defineConfig([
{
input: 'src/index.ts',
output: [
{ file: 'dist/esm/index.mjs', format: 'esm' },
{ file: 'dist/lib/index.cjs', format: 'cjs' }
],
plugins: [typescript(), resolve(), commonjs()]
},
{
input: 'src/index.ts',
output: [{ file: 'dist/index.d.ts', format: 'esm' }],
plugins: [resolve(), commonjs(), dts({ respectExternal: true })]
}
]);