加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rollup.config.prod.js 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
GuoJikun 提交于 2021-12-01 15:59 . feat:增加tip组件和steps组件
import nodeResolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import { terser } from "rollup-plugin-terser";
const components = [
"badge",
"button",
"card",
"checkbox",
"collapse",
"contextmenu",
"copy",
"divider",
"drawer",
"grid",
"icon",
"image",
"input",
"message",
"modal",
"progress",
"radio",
"rate",
"select",
"switch",
"tab",
"table",
"tag",
"timeline",
"tooltip",
"empty",
"tip",
"steps",
];
const generatorConfig = components => {
return components.map(c => {
return {
input: `./packages/${c}/src/index.js`,
output: [
{
name: `ivy-${c}`,
format: "umd",
file: `./packages/${c}/dist/${c}.js`,
},
{
format: "es",
file: `./packages/${c}/dist/${c}.module.js`,
},
{
format: "es",
file: `./packages/ivy-ui/dist/es/${c}.js`,
},
],
plugins: [nodeResolve(), terser(), commonjs],
};
});
};
export default [...generatorConfig(components)];
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化