-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrollup.config.js
34 lines (33 loc) · 872 Bytes
/
rollup.config.js
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
/* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable import/no-default-export */
import commonjs from '@rollup/plugin-commonjs';
import typescript from 'rollup-plugin-typescript2';
import { terser } from 'rollup-plugin-terser';
import external from 'rollup-plugin-peer-deps-external';
import postcss from 'rollup-plugin-postcss';
import url from '@rollup/plugin-url';
import svgr from '@svgr/rollup';
export default {
input: ['./src/index.ts'],
output: [
{
dir: 'dist',
format: 'es',
preserveModules: true,
preserveModulesRoot: 'src',
sourcemap: false,
},
],
plugins: [
external(),
commonjs(),
typescript({ tsconfig: './tsconfig.bundle.json' }),
url({
include: ['**/*.ttf', '**/*.svg'],
limit: Infinity,
}),
svgr({ icon: true }),
postcss(),
terser(),
],
};