1 Star 0 Fork 84

仗剑天涯/bootstrap-admin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rollup.config.mjs 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
欲饮琵琶码上催 提交于 2024-06-19 02:10 . 新增插件password-toggle
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import terser from '@rollup/plugin-terser';
import babel from '@rollup/plugin-babel';
import stripBanner from 'rollup-plugin-strip-banner';
import getBanner from "./build/banner.mjs"
const plugins = [
resolve(),
commonjs({
exclude:'src/js/loading.js'
}),
stripBanner({
include: '**/*.js',
exclude: 'node_modules/**'
}),
babel({
babelHelpers: 'bundled',
exclude: ['node_modules/**']
})
]
if (process.env.NODE_ENV === 'production') {
plugins.push(terser({
output: {
comments() {
return false
}
}
}))
}
const config = [];
const base = {
banner: getBanner(),
sourcemap: true,//方便调试
}
let input = 'src/js/bootstrap-admin.js'
let file = 'dist/js/bootstrap-admin.js'
if (process.env.NODE_ENV === 'production') {
file = file.replace(/\.js$/, '.min.js')
}
config.push({
input,
output: {
...base,
format: 'umd',
name: 'bootstrapadmin',
file,
globals: {
jquery: 'jQuery',
'quicktab': 'Quicktab',
},
},
external: ['jquery', 'quicktab'],
plugins
})
input = 'src/mock/index.js'
file = 'dist/js/bootstrap-admin.mock.js'
if (process.env.NODE_ENV === 'production') {
file = file.replace(/\.js$/, '.min.js')
}
config.push({
input,
output: {
...base,
format: 'iife',
file,
globals: {
mockjs: 'Mock'
},
},
external: ['mockjs'],
plugins
})
export default config;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/everbest_admin/bootstrap-admin.git
[email protected]:everbest_admin/bootstrap-admin.git
everbest_admin
bootstrap-admin
bootstrap-admin
2.x

搜索帮助