UNPKG

orc-component

Version:

react 组件库

51 lines (47 loc) 1.28 kB
/* * @Author: peiyanh * @Date: 2022-06-05 17:27:58 * @LastEditTime: 2022-06-07 17:44:44 * @LastEditors: peiyanh * @Description: * @FilePath: /rollup/rollup.dev.js * Copyright (c) 2004-2021 i-Sprint Technologies, Inc. * address: * All rights reserved. * * This software is the confidential and proprietary information of * i-Sprint Technologies, Inc. ('Confidential Information'). You shall not * disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered into * with i-Sprint. */ //rollup.dev.js import clear from 'rollup-plugin-clear' export default { input: "./src/index.ts", output: [ { file: './dist/my-lib-umd.js', format: 'umd', name: 'myLib' //当入口文件有export时,'umd'格式必须指定name //这样,在通过<script>标签引入时,才能通过name访问到export的内容。 }, { file: './dist/my-lib-es.js', format: 'es' }, { file: './dist/my-lib-cjs.js', format: 'cjs' } ], plugins: [ clear({ // required, point out which directories should be clear. targets: ['dist'], // optional, whether clear the directores when rollup recompile on --watch mode. watch: true, // default: false }), ] }