mirror of
https://gitee.com/antv/g6.git
synced 2024-11-30 18:58:34 +08:00
29 lines
716 B
JavaScript
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()] : []),
|
|
],
|
|
},
|
|
];
|