加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
rollup.config.js 662 Bytes
一键复制 编辑 原始数据 按行查看 历史
小小猫猫 提交于 2023-06-29 18:38 . feat: refine codes
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import terser from '@rollup/plugin-terser';
const getConfig = function (isMinify) {
const config = {
input: 'dist/index.js',
output: {
name: 'jquery-table-fixed-header',
format: 'umd',
globals: {
jquery: 'jQuery'
},
file: `dist/jquery-table-fixed-header${isMinify ? '.min' : ''}.js`,
},
external: ['jquery'],
plugins: [
resolve(), // so Rollup can find `ms`
commonjs(), // so Rollup can convert `ms` to an ES module
isMinify && terser()
],
};
return config;
};
export default [
getConfig(false),
getConfig(true)
];
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化