redux-devtools/packages/map2tree/rollup.config.js
Nathan Bierema c379a62081
Imprrove ability to tree-shake libraries (#1050)
* Revert "Remove React from page bundle (#1031)"

This reverts commit fdfbc1942e.

* redux-devtools

* d3-state-visualizer

* d3tooltip

* map2tree

* react-base16-styling

* react-dock and react-json-tree

* redux-devtools-app

* redux-devtools-chart-monitor

* redux-devtools-dock-monitor

* redux-devtools-extension

* redux-devtools-inspector-monitor-test-tab

* redux-devtools-inspector-monitor-trace-tab

* redux-devtools-instrument

* redux-devtools-log-monitor and redux-devtools-remote

* redux-devtools-rtk-query-monitor

* redux-devtools-serialize

* redux-devtools-slider-monitor

* redux-devtools-ui

* redux-devtools-utils

* Fix build

* Fix storybook build

Storybook loads the babel.config.json but not .babelrc.json. We actually don't want to load the babel config because it uses @babel/runtime which can't be resolved with Yarn PnP.
2022-01-24 02:11:46 +00:00

52 lines
1.1 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.ts',
output: {
name: 'map2tree',
file: 'lib/umd/map2tree.js',
format: 'umd',
},
plugins: [
typescript({
tsconfigOverride: { compilerOptions: { declaration: false } },
}),
resolve(),
commonjs(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts'],
plugins: ['@babel/plugin-transform-runtime'],
}),
],
},
{
input: 'src/index.ts',
output: {
name: 'map2tree',
file: 'lib/umd/map2tree.min.js',
format: 'umd',
},
plugins: [
typescript({
tsconfigOverride: { compilerOptions: { declaration: false } },
}),
resolve(),
commonjs(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts'],
plugins: ['@babel/plugin-transform-runtime'],
}),
terser(),
],
},
];
export default config;