1 Star 0 Fork 61

p0mp0k0/G2

forked from antv/G2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rollup.config.js 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
import { uglify } from 'rollup-plugin-uglify';
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/g2.min.js',
name: 'G2',
format: 'umd',
sourcemap: false,
},
plugins: [
nodePolyfills(),
resolve(),
commonjs(),
typescript(),
uglify(),
...(isBundleVis ? [visualizer()] : []),
],
},
{
input: 'src/index.ts',
output: {
file: 'dist/g2-lite.min.js',
name: 'G2',
format: 'umd',
sourcemap: false,
globals: {
'@antv/g': 'window.G',
'@antv/g-canvas': 'window.G.Canvas2D',
},
},
external: ['@antv/g', '@antv/g-canvas'],
plugins: [nodePolyfills(), resolve(), commonjs(), typescript(), uglify()],
},
];
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/p0mp0k0/g2.git
git@gitee.com:p0mp0k0/g2.git
p0mp0k0
g2
G2
v5

搜索帮助