-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrollup.config.js
More file actions
37 lines (36 loc) · 862 Bytes
/
rollup.config.js
File metadata and controls
37 lines (36 loc) · 862 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
const typescript = require('rollup-plugin-typescript2');
const postcss = require('rollup-plugin-postcss');
const peerDepsExternal = require('rollup-plugin-peer-deps-external');
const babel = require('@rollup/plugin-babel');
module.exports = {
input: 'src/Confetti.tsx',
output: [
{
file: 'dist/index.cjs.js',
format: 'cjs',
sourcemap: true,
exports: 'auto',
},
{
file: 'dist/index.esm.js',
format: 'esm',
sourcemap: true,
},
],
plugins: [
peerDepsExternal(),
postcss({
modules: true,
inject: true,
minimize: true,
sourceMap: true,
plugins: [require('autoprefixer')],
}),
babel({
exclude: 'node_modules/**',
babelHelpers: 'bundled',
}),
typescript({ useTsconfigDeclarationDir: true }),
],
external: ['react', 'react-dom'],
};