1234567891011121314151617181920212223242526272829303132333435 |
- import { defineConfig } from 'vite';
- import vue from '@vitejs/plugin-vue'
- import vueJsx from '@vitejs/plugin-vue-jsx'
- import path from 'path';
- import fs from "fs";
- const pathResolve = (pathStr: string) => {
- return path.resolve(__dirname, pathStr);
- };
- module.exports = defineConfig({
- plugins: [vue(), vueJsx()],
- alias: {
- '@': pathResolve('./src'),
- },
- server: {
- port: 443,
- https: {
- key: fs.readFileSync("./cert/6353984_jpcj-h5.zzxcx.net.key"),
- cert: fs.readFileSync("./cert/6353984_jpcj-h5.zzxcx.net.pem")
- },
- // proxy: {
- // "/dev-api": {
- // target: "https://sdjk-admin1.zzxcx.net/sdjk-admin/",
- // changeOrigin: true,
- // rewrite: (path) => path.replace(/^\/dev-api/, ""),
- // },
- // "/prod-api": {
- // target: "https://sdjk-admin.zzxcx.net/sdjk-admin/",
- // changeOrigin: true,
- // rewrite: (path) => path.replace(/^\/prod-api/, ""),
- // },
- // },
- },
- });
|