vite.config.ts 720 B

12345678910111213141516171819202122232425262728
  1. import { defineConfig } from 'vite';
  2. import vue from '@vitejs/plugin-vue'
  3. import vueJsx from '@vitejs/plugin-vue-jsx'
  4. import path from 'path';
  5. import fs from "fs";
  6. const pathResolve = (pathStr: string) => {
  7. return path.resolve(__dirname, pathStr);
  8. };
  9. module.exports = defineConfig({
  10. plugins: [vue(), vueJsx()],
  11. alias: {
  12. '@': pathResolve('./src'),
  13. },
  14. server: {
  15. https: {
  16. key: fs.readFileSync("./cert/6353984_jpcj-h5.zzxcx.net.key"),
  17. cert: fs.readFileSync("./cert/6353984_jpcj-h5.zzxcx.net.pem"),
  18. },
  19. host: "coach.zzxcx.net",
  20. port: 443,
  21. // https: {
  22. // key: fs.readFileSync("./cert/6353984_jpcj-h5.zzxcx.net.key"),
  23. // cert: fs.readFileSync("./cert/6353984_jpcj-h5.zzxcx.net.pem")
  24. // },
  25. },
  26. });