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

31 lines
763 B
JavaScript
Raw 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',
name: 'g6-extension-3d',
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
},
];