no message

This commit is contained in:
hellcat 2026-06-14 16:23:09 +08:00
parent d14fc8fb66
commit c050cb460d

View File

@ -1,24 +0,0 @@
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true,
}),
],
// 💡 核心高标准配置:彻底解决所有跨域拦截
server: {
cors: true,
// 如果上面写 true 还不行,可以直接写死允许你的本地域名:
// cors: {
// origin: 'http://dd.loc',
// methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
// allowedHeaders: ['Content-Type', 'Authorization', 'X-Requested-With']
// },
hmr: {
host: 'dd.loc', // 让热更新握手也走你的域名
},
},
});