代码拉取完成,页面将自动刷新
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
// }
];
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。