1 Star 0 Fork 121

phenix/F2

forked from antv/F2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rollup.config.js 1.51 KB
一键复制 编辑 原始数据 按行查看 历史
索丘 提交于 2020-05-22 16:39 . feat: 添加esm的模块输出
import { terser } from 'rollup-plugin-terser';
import resolve from '@rollup/plugin-node-resolve';
import babel from '@rollup/plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
const babelPlugin = babel({ babelHelpers: 'bundled' });
const terserPlugin = terser();
const commonjsPlugin = commonjs();
const resolvePlugin = resolve();
export default [
{
input: './src/index-all.js',
output: [
{
name: 'F2',
file: 'dist/f2-all.js',
format: 'umd',
exports: 'named'
},
{
name: 'F2',
file: 'dist/f2-all.min.js',
format: 'umd',
exports: 'named',
plugins: [ terserPlugin ]
}
],
plugins: [ resolvePlugin, commonjsPlugin, babelPlugin ]
},
{
input: './src/index.js',
output: [
{
name: 'F2',
file: 'dist/f2.js',
format: 'umd',
exports: 'named'
},
{
name: 'F2',
file: 'dist/f2.min.js',
format: 'umd',
exports: 'named',
plugins: [ terserPlugin ]
}
],
plugins: [ resolvePlugin, commonjsPlugin, babelPlugin ]
},
{
input: './src/index-simple.js',
output: [
{
name: 'F2',
file: 'dist/f2-simple.js',
format: 'umd',
exports: 'named'
},
{
name: 'F2',
file: 'dist/f2-simple.min.js',
format: 'umd',
exports: 'named',
plugins: [ terserPlugin ]
}
],
plugins: [ resolvePlugin, commonjsPlugin, babelPlugin ]
}
];
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/phenixing/f2.git
git@gitee.com:phenixing/f2.git
phenixing
f2
F2
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385