g6/packages/g6-plugin-map-view/rollup.config.js
2023-10-08 14:50:16 +08:00

29 lines
716 B
JavaScript

import terser from '@rollup/plugin-terser';
import resolve from 'rollup-plugin-node-resolve';
import typescript from 'rollup-plugin-typescript';
import commonjs from '@rollup/plugin-commonjs';
import nodePolyfills from 'rollup-plugin-polyfill-node';
import { visualizer } from 'rollup-plugin-visualizer';
const isBundleVis = !!process.env.BUNDLE_VIS;
module.exports = [
{
input: 'src/index.ts',
output: {
file: 'dist/g6-plugin-map-view.min.js',
name: 'G6PluginMapView',
format: 'umd',
sourcemap: false,
},
plugins: [
nodePolyfills(),
resolve(),
commonjs(),
typescript(),
terser(),
...(isBundleVis ? [visualizer()] : []),
],
},
];