1 Star 3 Fork 7

张鑫/AILabel

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rollup.config.js 1.67 KB
一键复制 编辑 原始数据 按行查看 历史
dingyang9642 提交于 2022-01-17 14:41 +08:00 . 重新发版5.1.10
import babel from 'rollup-plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
import nodeResolve from '@rollup/plugin-node-resolve';
import {uglify} from 'rollup-plugin-uglify';
import json from '@rollup/plugin-json'
import pkg from './package.json';
// 支持拓展文件
const extensions = ['.js', '.ts'];
// 相关配置plugins
const plugins = [
nodeResolve({extensions}),
commonjs(), // so Rollup can convert `ms` to an ES module
babel({
exclude: 'node_modules/**',
runtimeHelpers: true,
extensions
}),
json(),
// uglify()
];
export default [
// browser-friendly UMD build
{
input: 'libs/main.ts',
// external: ['zrender'],
output: [{
name: 'AILabel',
file: pkg.browser,
format: 'umd'
},
{
name: 'AILabel',
file: pkg.browser_demo,
format: 'umd'
}
// {
// name: 'AILabel',
// file: pkg.browser_website,
// format: 'umd'
// },
],
plugins
},
// CommonJS (for Node) and ES module (for bundlers) build.
// (We could have three entries in the configuration array
// instead of two, but it's quicker to generate multiple
// builds from a single configuration where possible, using
// an array for the `output` option, where we can specify
// `file` and `format` for each target)
// {
// input: 'libs/main.ts',
// external: ['lodash'],
// output: [
// { file: pkg.main, format: 'cjs' },
// { file: pkg.module, format: 'es' }
// ],
// plugins
// }
];
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/JoinXin/AILabel.git
git@gitee.com:JoinXin/AILabel.git
JoinXin
AILabel
AILabel
master

搜索帮助