mirror of
https://gitee.com/antv/g6.git
synced 2024-12-02 03:38:20 +08:00
31 lines
767 B
JavaScript
31 lines
767 B
JavaScript
import commonjs from '@rollup/plugin-commonjs';
|
|
import resolve from '@rollup/plugin-node-resolve';
|
|
import terser from '@rollup/plugin-terser';
|
|
import typescript from '@rollup/plugin-typescript';
|
|
import nodePolyfills from 'rollup-plugin-polyfill-node';
|
|
import { visualizer } from 'rollup-plugin-visualizer';
|
|
|
|
const isBundleVis = !!process.env.BUNDLE_VIS;
|
|
|
|
export default [
|
|
{
|
|
input: 'src/index.ts',
|
|
output: {
|
|
file: 'dist/g6-extension-react.min.js',
|
|
name: 'G6ExtensionReact',
|
|
format: 'umd',
|
|
sourcemap: false,
|
|
},
|
|
plugins: [
|
|
nodePolyfills(),
|
|
resolve(),
|
|
commonjs(),
|
|
typescript({
|
|
tsconfig: 'tsconfig.build.json',
|
|
}),
|
|
terser(),
|
|
...(isBundleVis ? [visualizer()] : []),
|
|
],
|
|
},
|
|
];
|