forked from algolia/docsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.base.config.js
More file actions
33 lines (31 loc) · 881 Bytes
/
rollup.base.config.js
File metadata and controls
33 lines (31 loc) · 881 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
import { babel } from '@rollup/plugin-babel';
import json from '@rollup/plugin-json';
import resolve from '@rollup/plugin-node-resolve';
import replace from '@rollup/plugin-replace';
import dts from 'rollup-plugin-dts';
import filesize from 'rollup-plugin-filesize';
import { terser } from 'rollup-plugin-terser';
export const plugins = [
replace({
__DEV__: JSON.stringify(process.env.NODE_ENV === 'development'),
}),
json(),
resolve({
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
}),
babel({
exclude: 'node_modules/**',
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
rootMode: 'upward',
}),
terser(),
filesize({
showMinifiedSize: false,
showGzippedSize: true,
}),
];
export const typesConfig = {
input: 'dist/esm/types/index.d.ts',
output: [{ file: 'dist/esm/index.d.ts', format: 'es' }],
plugins: [dts()],
};