|
@@ -1,40 +1,8 @@
|
|
|
import { defineConfig } from 'vite'
|
|
|
-import { resolve } from 'path'
|
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
-import Components from "unplugin-vue-components/vite";
|
|
|
-import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
|
|
|
-
|
|
|
-const port = process.env.PORT ? parseInt(process.env.PORT) : 3000;
|
|
|
-
|
|
|
+// https://vite.dev/config/
|
|
|
export default defineConfig({
|
|
|
plugins: [
|
|
|
- vue(),
|
|
|
- Components({
|
|
|
- resolvers: [AntDesignVueResolver({ importStyle: false })],
|
|
|
- }),
|
|
|
+ vue()
|
|
|
],
|
|
|
- base: `/ide/proxy/${port}/`,
|
|
|
- resolve: {
|
|
|
- alias: {
|
|
|
- '@': resolve(__dirname, 'src')
|
|
|
- },
|
|
|
- },
|
|
|
- server: {
|
|
|
- host: '0.0.0.0', // 监听所有网络
|
|
|
- port, // 确保端口匹配
|
|
|
- strictPort: true, // 保证端口不会被其他程序占用
|
|
|
- watch: {
|
|
|
- usePolling: true
|
|
|
- },
|
|
|
- hmr: {
|
|
|
- clientPort: 443, // 让 HMR 使用 443 端口
|
|
|
- protocol: 'wss', // 强制 WebSocket 使用 wss
|
|
|
- host: 'genlitex-test-01.cn',
|
|
|
- },
|
|
|
- allowedHosts: [
|
|
|
- 'localhost',
|
|
|
- '127.0.0.1',
|
|
|
- 'genlitex-test-01.cn'
|
|
|
- ]
|
|
|
- }
|
|
|
-});
|
|
|
+})
|