1 Star 0 Fork 0

hanlei525 / utils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
rollup.config.js 923 Bytes
一键复制 编辑 原始数据 按行查看 历史
import babel from '@rollup/plugin-babel'
import { terser } from 'rollup-plugin-terser'
import alias from '@rollup/plugin-alias'
const path = require('path')
const resolveDir = dir => path.join(__dirname, dir)
export default {
input: 'src/index.js', // 要打包的文件源路径(应用程序的主要入口点)
// 同时输出多种格式
output: [
{
file: 'dist/hl-utils.js', // 打包后生产的文件位置,以及文件名
format: 'umd', // 文件的输出格式(CommonJS规范,是Node.js的官方模块化规范) amd, cjs, es, iife, umd, system
name: 'hlUtils' // 包的全局变量名称
},
{
file: 'dist/hl-utils.min.js',
format: 'umd',
name: 'hlUtils',
plugins: [terser()]
},
],
plugins: [
babel({ babelHelpers: 'bundled' }),
alias({
entries: [
{ find: '@', replacement: resolveDir('src') }
]
})
]
}
JavaScript
1
https://gitee.com/hlshare/utils.git
git@gitee.com:hlshare/utils.git
hlshare
utils
utils
main

搜索帮助

53164aa7 5694891 3bd8fe86 5694891