mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-14 02:45:06 +08:00
feat: 改用 https,加快首次打开页面
This commit is contained in:
@ -26,20 +26,20 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
||||
// 服务端渲染
|
||||
server: {
|
||||
// 是否开启 https
|
||||
https: false,
|
||||
https: true,
|
||||
// 端口号
|
||||
port: env.VITE_PORT,
|
||||
host: "0.0.0.0",
|
||||
open: env.VITE_OPEN === 'true',
|
||||
// 本地跨域代理
|
||||
proxy: {
|
||||
['/admin-api']: {
|
||||
target: env.VITE_BASE_URL,
|
||||
ws: false,
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(new RegExp(`^/admin-api`), ''),
|
||||
},
|
||||
},
|
||||
// proxy: {
|
||||
// ['/admin-api']: {
|
||||
// target: env.VITE_BASE_URL,
|
||||
// ws: false,
|
||||
// changeOrigin: true,
|
||||
// rewrite: (path) => path.replace(new RegExp(`^/admin-api`), ''),
|
||||
// },
|
||||
// },
|
||||
},
|
||||
// 项目使用的vite插件。 单独提取到build/vite/plugin中管理
|
||||
plugins: createVitePlugins(env.VITE_APP_TITLE),
|
||||
|
Reference in New Issue
Block a user