vite.config

import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'




// https://vitejs.dev/config/
export default defineConfig({
 // server: {
  //  base: "/",
  //  port: 3003,
  //  host: '0.0.0.0',
  //  open: true,
  //},
   //新增加内容开始
    server:{
      base: "/",
      open: true,
      port:80,//将端口更改为80
      host:'0.0.0.0',
      allowedHosts: [
        'localhost',
        'www.eztgov.com',
        '172.23.103.14',//内网
        '115.29.177.17' // 外网IP 地址
      ],
      cors:{
        origin:['http://www.eztgov.com']
      }
    },
    //新增加内容结束
  resolve: {
    alias: {
      '@': '/src/'
    },
  },

  plugins: [vue()],
})

  

posted @ 2025-05-20 11:35  华腾智算  阅读(33)  评论(0)    收藏  举报
https://damo.alibaba.com/ https://tianchi.aliyun.com/course?spm=5176.21206777.J_3941670930.5.87dc17c9BZNvLL