g6/packages/g6-extension-3d/rollup.config.mjs

31 lines
761 B
JavaScript
Raw Permalink Normal View History

2023-09-25 11:14:47 +08:00
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';
2023-09-25 11:14:47 +08:00
import nodePolyfills from 'rollup-plugin-polyfill-node';
import { visualizer } from 'rollup-plugin-visualizer';
const isBundleVis = !!process.env.BUNDLE_VIS;
export default [
2023-09-25 11:14:47 +08:00
{
input: 'src/index.ts',
output: {
file: 'dist/g6-extension-3d.min.js',
2024-04-22 18:17:44 +08:00
name: 'G6Extension3D',
2023-09-25 11:14:47 +08:00
format: 'umd',
sourcemap: false,
},
plugins: [
nodePolyfills(),
resolve(),
commonjs(),
typescript({
tsconfig: 'tsconfig.build.json',
}),
terser(),
...(isBundleVis ? [visualizer()] : []),
],
2023-09-25 11:14:47 +08:00
},
];