暂时取消 https 加速方案,主要考虑 server 端没有 https
This commit is contained in:
parent
6cf76691a1
commit
7f336bbe92
@ -14,9 +14,7 @@ import viteCompression from 'vite-plugin-compression'
|
|||||||
import vueSetupExtend from 'vite-plugin-vue-setup-extend'
|
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'
|
||||||
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) {
|
export function createVitePlugins(VITE_APP_TITLE: string) {
|
||||||
const root = process.cwd()
|
const root = process.cwd()
|
||||||
// 路径查找
|
// 路径查找
|
||||||
@ -96,9 +94,6 @@ export function createVitePlugins(VITE_APP_TITLE: string) {
|
|||||||
}),
|
}),
|
||||||
ViteEjsPlugin({
|
ViteEjsPlugin({
|
||||||
title: VITE_APP_TITLE
|
title: VITE_APP_TITLE
|
||||||
}),
|
})
|
||||||
mkcert(),
|
|
||||||
// PkgConfig(),
|
|
||||||
// OptimizationPersist(),
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -25,13 +25,11 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
|||||||
root: root,
|
root: root,
|
||||||
// 服务端渲染
|
// 服务端渲染
|
||||||
server: {
|
server: {
|
||||||
// 是否开启 https
|
|
||||||
https: true,
|
|
||||||
// 端口号
|
// 端口号
|
||||||
port: env.VITE_PORT,
|
port: env.VITE_PORT,
|
||||||
host: "0.0.0.0",
|
host: "0.0.0.0",
|
||||||
open: env.VITE_OPEN === 'true',
|
open: env.VITE_OPEN === 'true',
|
||||||
// 本地跨域代理
|
// 本地跨域代理. 目前注释的原因:暂时没有用途,server 端已经支持跨域
|
||||||
// proxy: {
|
// proxy: {
|
||||||
// ['/admin-api']: {
|
// ['/admin-api']: {
|
||||||
// target: env.VITE_BASE_URL,
|
// target: env.VITE_BASE_URL,
|
||||||
|
Loading…
Reference in New Issue
Block a user