UNPKG

z-utils-ts

Version:

使用TypeScript编写的工具函数库

29 lines (28 loc) 701 B
import babel from '@rollup/plugin-babel'; import typescript from '@rollup/plugin-typescript'; export default { input: 'src/index.ts', // 入口文件 output: [ { file: 'dist/index.cjs.js', format: 'cjs', exports: 'auto' }, { file: 'dist/index.esm.js', format: 'esm' }, { file: 'dist/index.iife.js', format: 'iife', name: 'MyLibrary' } ], plugins: [ typescript(), babel({ babelHelpers: 'bundled', exclude: 'node_modules/**' // 排除 node_modules 目录 }) ] };