deep-engine-demo/packages/demo/vite.config.ts
2026-05-06 22:16:20 +08:00

49 lines
1.2 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { defineConfig, normalizePath } from 'vite'
import vue from '@vitejs/plugin-vue'
import TurboConsole from 'unplugin-turbo-console/vite'
import { viteStaticCopy } from 'vite-plugin-static-copy'
import vueJsx from '@vitejs/plugin-vue-jsx'
import * as path from "node:path";
// https://vite.dev/config/
export default defineConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
plugins: [
vue(),
// TurboConsole({
// // 配置选项
// launchEditor: {
// specifiedEditor: 'webstorm',
// },
// }),
viteStaticCopy({
targets: [
{
src: normalizePath(path.resolve(__dirname, "../sdk/public/**/*")),
dest: ".",
rename: {
stripBase: 2
}
}
]
}),
vueJsx({
// options are passed on to @vue/babel-plugin-jsx
}),
],
// 开发服务器配置
server: {
// 监听所有网络接口0.0.0.0允许外部IP访问
host: '0.0.0.0',
// 可选指定端口如8099和你之前的Caddy端口一致
port: 8059,
// 可选:端口被占用时自动切换可用端口
strictPort: false,
// 可选:自动打开浏览器
// open: true
}
})