当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
3 Star 5 Fork 2

holyhigh/func.js-old
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rollup.config.prod.js 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
holyhigh 提交于 2021-12-28 23:29 +08:00 . v 0.18.1
/* eslint-disable max-len */
import {nodeResolve} from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import babel from '@rollup/plugin-babel';
import {terser} from 'rollup-plugin-terser';
import banner2 from 'rollup-plugin-banner2';
import json from '@rollup/plugin-json';
import copy from 'rollup-plugin-copy';
const pkg = require('./package.json');
const targets = [
{
input: 'src/index.js',
plugins: [
nodeResolve(),
babel({
include: 'src/**',
exclude: 'node_modules/**',
}),
commonjs(),
banner2(() => `/**
* func.js v${pkg.version}
* @${pkg.author}
* ${pkg.repository.url}
*/
`),
json(),
copy({
targets: [
{src: ['CHANGELOG.md', 'LICENSE', 'README.md', 'package.json', '.npmignore'], dest: 'dist'},
{src: 'types/*', dest: 'dist/types'},
],
}),
],
output: [
{file: 'dist/func.umd.js', format: 'umd', name: '_', exports: 'auto', sourcemap: true, plugins: [terser()]},
{file: 'dist/func.js', format: 'iife', name: '_', exports: 'auto'},
{file: 'dist/func.min.js', format: 'iife', name: '_', exports: 'auto', sourcemap: true, plugins: [terser()]},
{file: 'dist/func.esm.js', format: 'esm', sourcemap: true, plugins: [terser()]},
],
},
];
['collection', 'datetime', 'functions', 'is', 'number', 'object', 'string', 'math', 'chaining', 'utils'].forEach((module) => {
targets.push({
input: `src/${module}.js`,
output: {file: `dist/${module}.js`, format: 'umd', name: '_', exports: 'auto'},
});
});
export default targets;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/holyhigh2/func.js-old.git
git@gitee.com:holyhigh2/func.js-old.git
holyhigh2
func.js-old
func.js-old
1.x

搜索帮助