From 7f336bbe9242d4a001ec9fc058c7649b683b0c62 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 7 Mar 2023 19:21:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=8F=96=E6=B6=88=20https=20?= =?UTF-8?q?=E5=8A=A0=E9=80=9F=E6=96=B9=E6=A1=88=EF=BC=8C=E4=B8=BB=E8=A6=81?= =?UTF-8?q?=E8=80=83=E8=99=91=20server=20=E7=AB=AF=E6=B2=A1=E6=9C=89=20htt?= =?UTF-8?q?ps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/vite/index.ts | 9 ++------- vite.config.ts | 4 +--- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/build/vite/index.ts b/build/vite/index.ts index 41bbc040..304ce0d5 100644 --- a/build/vite/index.ts +++ b/build/vite/index.ts @@ -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(), + }) ] } diff --git a/vite.config.ts b/vite.config.ts index 0ca5b697..d1ad957f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -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,