redux-devtools/packages/react-json-tree/rollup.config.mjs
renovate[bot] 37b51a1bb5
chore(deps): update dependency rollup to v3 (#1251)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-28 14:42:59 +00:00

60 lines
1.3 KiB
JavaScript

import typescript from 'rollup-plugin-typescript2';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import babel from '@rollup/plugin-babel';
import terser from '@rollup/plugin-terser';
const config = [
{
input: 'src/index.tsx',
output: {
name: 'ReactJsonTree',
file: 'lib/umd/react-json-tree.js',
format: 'umd',
globals: {
react: 'React',
},
},
plugins: [
typescript({
tsconfigOverride: { compilerOptions: { declaration: false } },
}),
resolve(),
commonjs(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts', '.tsx'],
plugins: ['@babel/plugin-transform-runtime'],
}),
],
external: ['react'],
},
{
input: 'src/index.tsx',
output: {
name: 'ReactJsonTree',
file: 'lib/umd/react-json-tree.min.js',
format: 'umd',
globals: {
react: 'React',
},
},
plugins: [
typescript({
tsconfigOverride: { compilerOptions: { declaration: false } },
}),
resolve(),
commonjs(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts', '.tsx'],
plugins: ['@babel/plugin-transform-runtime'],
}),
terser(),
],
external: ['react'],
},
];
export default config;