modules/00_Admin/Admin.UI/build/base.config.ts
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
import type { UserConfig } from 'vite'
import { resolve } from 'path'
import vue from '@vitejs/plugin-vue'
import mui from 'mkh-ui/lib/plugins/index.js'
export default ({ target, mode, command }): UserConfig => {
return {
base: './',
server: {
port: 5220,
},
envPrefix: 'MKH',
plugins: [
mui({
target,
mode,
command,
/** index.html文件转换 */
htmlTransform: {
/** 模板渲染数据,如果使用自己的模板,则自己定义渲染数据 */
render: {
//图标
favicon: './assets/mkh/favicon.ico',
/** 版权信息 */
copyright: '版权所有:OLDLI',
/** Logo */
logo: './assets/mkh/logo.png',
},
/** 压缩配置 */
minify: {},
},
}),
vue(),
],
css: {
postcss: {
plugins: [
{
/** 解决打包时出现 warning: "@charset" must be the first rule in the file */
postcssPlugin: 'internal:charset-removal',
AtRule: {
charset: (atRule) => {
if (atRule.name === 'charset') {
atRule.remove()
}
},
},
/**转换css中图片的相对路径 */
Declaration(decl) {
let reg = /url\((.+?)\)/gi
if (decl.value.match(reg)) {
decl.value = decl.value.replaceAll('../', '')
}
},
},
],
},
},
resolve: {
alias: {
后面还有 5 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
