chore: update vite 4.2
This commit is contained in:
parent
69acb5bb33
commit
e6ccfbddb6
@ -15,7 +15,7 @@ import vueSetupExtend from 'vite-plugin-vue-setup-extend'
|
|||||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
|
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
|
||||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
||||||
|
|
||||||
export function createVitePlugins(VITE_APP_TITLE: string) {
|
export function createVitePlugins() {
|
||||||
const root = process.cwd()
|
const root = process.cwd()
|
||||||
// 路径查找
|
// 路径查找
|
||||||
function pathResolve(dir: string) {
|
function pathResolve(dir: string) {
|
||||||
@ -95,8 +95,6 @@ export function createVitePlugins(VITE_APP_TITLE: string) {
|
|||||||
ext: '.gz', // 生成的压缩包后缀
|
ext: '.gz', // 生成的压缩包后缀
|
||||||
deleteOriginFile: false //压缩后是否删除源文件
|
deleteOriginFile: false //压缩后是否删除源文件
|
||||||
}),
|
}),
|
||||||
ViteEjsPlugin({
|
ViteEjsPlugin()
|
||||||
title: VITE_APP_TITLE
|
|
||||||
})
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
name="description"
|
name="description"
|
||||||
content="芋道管理系统 基于 vue3 + CompositionAPI + typescript + vite3 + element plus 的后台开源免费管理系统!"
|
content="芋道管理系统 基于 vue3 + CompositionAPI + typescript + vite3 + element plus 的后台开源免费管理系统!"
|
||||||
/>
|
/>
|
||||||
<title><%= title %></title>
|
<title>%VITE_APP_TITLE%</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
@ -137,7 +137,7 @@
|
|||||||
<div class="app-loading-wrap">
|
<div class="app-loading-wrap">
|
||||||
<div class="app-loading-title">
|
<div class="app-loading-title">
|
||||||
<img src="/logo.gif" class="app-loading-logo" alt="Logo" />
|
<img src="/logo.gif" class="app-loading-logo" alt="Logo" />
|
||||||
<div class="app-loading-title"><%= title %></div>
|
<div class="app-loading-title">%VITE_APP_TITLE%</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="app-loading-item">
|
<div class="app-loading-item">
|
||||||
<div class="app-loading-outter"></div>
|
<div class="app-loading-outter"></div>
|
||||||
|
@ -42,7 +42,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
|||||||
// },
|
// },
|
||||||
},
|
},
|
||||||
// 项目使用的vite插件。 单独提取到build/vite/plugin中管理
|
// 项目使用的vite插件。 单独提取到build/vite/plugin中管理
|
||||||
plugins: createVitePlugins(env.VITE_APP_TITLE),
|
plugins: createVitePlugins(),
|
||||||
css: {
|
css: {
|
||||||
preprocessorOptions: {
|
preprocessorOptions: {
|
||||||
scss: {
|
scss: {
|
||||||
|
Loading…
Reference in New Issue
Block a user