暂时取消 https 加速方案,主要考虑 server 端没有 https

This commit is contained in:
YunaiV 2023-03-07 19:21:39 +08:00
parent 6cf76691a1
commit 7f336bbe92
2 changed files with 3 additions and 10 deletions

View File

@ -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(),
})
]
}

View File

@ -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,