|
@@ -1,18 +1,21 @@
|
|
|
import { defineConfig, loadEnv } from 'vite'
|
|
import { defineConfig, loadEnv } from 'vite'
|
|
|
import path from 'path'
|
|
import path from 'path'
|
|
|
import createVitePlugins from './vite/plugins'
|
|
import createVitePlugins from './vite/plugins'
|
|
|
|
|
+import * as fs from "node:fs";
|
|
|
|
|
+
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
// https://vitejs.dev/config/
|
|
|
let dev = {
|
|
let dev = {
|
|
|
// shaoyang: `http://42.48.99.5:20002`
|
|
// shaoyang: `http://42.48.99.5:20002`
|
|
|
// shaoyang: `http://192.168.110.235:20002`
|
|
// shaoyang: `http://192.168.110.235:20002`
|
|
|
- shaoyang: `http://192.168.110.13:20002`
|
|
|
|
|
|
|
+ shaoyang: `https://192.168.110.13:20002`
|
|
|
}
|
|
}
|
|
|
export default defineConfig(({ mode, command }) => {
|
|
export default defineConfig(({ mode, command }) => {
|
|
|
const env = loadEnv(mode, process.cwd())
|
|
const env = loadEnv(mode, process.cwd())
|
|
|
const { VITE_APP_ENV } = env
|
|
const { VITE_APP_ENV } = env
|
|
|
return {
|
|
return {
|
|
|
- base: VITE_APP_ENV === 'production' ? '/' : '/',
|
|
|
|
|
|
|
+ // base: VITE_APP_ENV === 'production' ? '/qyxyfjflgl/' : '/',
|
|
|
|
|
+ base: '/qyxyfjflgl/',
|
|
|
plugins: createVitePlugins(env, command === 'build'),
|
|
plugins: createVitePlugins(env, command === 'build'),
|
|
|
resolve: {
|
|
resolve: {
|
|
|
// https://cn.vitejs.dev/config/#resolve-alias
|
|
// https://cn.vitejs.dev/config/#resolve-alias
|
|
@@ -31,6 +34,10 @@ export default defineConfig(({ mode, command }) => {
|
|
|
port: 8081,
|
|
port: 8081,
|
|
|
host: true,
|
|
host: true,
|
|
|
open: true,
|
|
open: true,
|
|
|
|
|
+ https: {
|
|
|
|
|
+ key: fs.readFileSync('C:/Users/hxb/Desktop/证书/huaihua.gov.cn/PEM_NGINX/_.huaihua.gov.cn.key'),
|
|
|
|
|
+ cert: fs.readFileSync('C:/Users/hxb/Desktop/证书/huaihua.gov.cn/PEM_NGINX/_.huaihua.gov.cn.crt')
|
|
|
|
|
+ },
|
|
|
proxy: {
|
|
proxy: {
|
|
|
// https://cn.vitejs.dev/config/#server-proxy
|
|
// https://cn.vitejs.dev/config/#server-proxy
|
|
|
'/dev-api': {
|
|
'/dev-api': {
|