1
0
Fork 0
docsearch/rollup.base.config.js
2020-09-01 11:54:48 +02:00

27 lines
743 B
JavaScript

import json from '@rollup/plugin-json';
import resolve from '@rollup/plugin-node-resolve';
import replace from '@rollup/plugin-replace';
import babel from 'rollup-plugin-babel';
import filesize from 'rollup-plugin-filesize';
import { terser } from 'rollup-plugin-terser';
export const plugins = [
replace({
__DEV__: JSON.stringify(process.env.NODE_ENV === 'development'),
__VERSION__: JSON.stringify(process.env.VERSION),
}),
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,
}),
];