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
7f336bbe
authored
Mar 07, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
暂时取消 https 加速方案,主要考虑 server 端没有 https
parent
6cf76691
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
10 deletions
+3
-10
build/vite/index.ts
+2
-7
vite.config.ts
+1
-3
No files found.
build/vite/index.ts
View file @
7f336bbe
...
...
@@ -14,9 +14,7 @@ import viteCompression from 'vite-plugin-compression'
import
vueSetupExtend
from
'vite-plugin-vue-setup-extend'
import
VueI18nPlugin
from
'@intlify/unplugin-vue-i18n/vite'
import
{
createSvgIconsPlugin
}
from
'vite-plugin-svg-icons'
import
mkcert
from
'vite-plugin-mkcert'
// import PkgConfig from 'vite-plugin-package-config'
// import OptimizationPersist from 'vite-plugin-optimize-persist'
export
function
createVitePlugins
(
VITE_APP_TITLE
:
string
)
{
const
root
=
process
.
cwd
()
// 路径查找
...
...
@@ -96,9 +94,6 @@ export function createVitePlugins(VITE_APP_TITLE: string) {
}),
ViteEjsPlugin
({
title
:
VITE_APP_TITLE
}),
mkcert
(),
// PkgConfig(),
// OptimizationPersist(),
})
]
}
vite.config.ts
View file @
7f336bbe
...
...
@@ -25,13 +25,11 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
root
:
root
,
// 服务端渲染
server
:
{
// 是否开启 https
https
:
true
,
// 端口号
port
:
env
.
VITE_PORT
,
host
:
"0.0.0.0"
,
open
:
env
.
VITE_OPEN
===
'true'
,
// 本地跨域代理
// 本地跨域代理
. 目前注释的原因:暂时没有用途,server 端已经支持跨域
// proxy: {
// ['/admin-api']: {
// target: env.VITE_BASE_URL,
...
...
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