forked from herrethan/react-confetti-explosion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.mjs
34 lines (33 loc) · 845 Bytes
/
rollup.config.mjs
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
import externals from 'rollup-plugin-node-externals';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import typescript from 'rollup-plugin-typescript2';
import packageJson from './package.json' assert { type: 'json' };
export default {
input: 'src/confetti/index.tsx',
output: [
{
file: packageJson.main,
format: 'cjs',
sourcemap: true,
},
{
file: packageJson.module,
format: 'esm',
sourcemap: true,
},
],
plugins: [
externals(),
resolve(),
commonjs(),
typescript({
useTsconfigDeclarationDir: true,
tsconfigOverride: {
exclude: ['src/index.tsx', 'src/example.tsx', '**/setupTests.ts', '**/*.spec.tsx', '**/*.spec.ts'],
},
}),
json(),
],
};