Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e6ccfbdd
authored
Mar 23, 2023
by
xingyuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update vite 4.2
parent
69acb5bb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
build/vite/index.ts
+2
-4
index.html
+2
-2
vite.config.ts
+1
-1
No files found.
build/vite/index.ts
View file @
e6ccfbdd
...
@@ -15,7 +15,7 @@ import vueSetupExtend from 'vite-plugin-vue-setup-extend'
...
@@ -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) {
...
@@ -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
})
]
]
}
}
index.html
View file @
e6ccfbdd
...
@@ -13,7 +13,7 @@
...
@@ -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 @@
...
@@ -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>
...
...
vite.config.ts
View file @
e6ccfbdd
...
@@ -42,7 +42,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
...
@@ -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
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment