配置路由
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m48s

This commit is contained in:
Song367 2026-03-09 16:33:31 +08:00
parent 85aba6647b
commit 08c58c06d7
3 changed files with 7 additions and 7 deletions

0
.docker-tmp/buildx/.lock Normal file
View File

View File

@ -17,13 +17,12 @@ http {
server {
listen 80;
server_name localhost;
location = /creation-flow-app {
return 301 https://$host/creation-flow-app/login;
location = /scriptflow {
return 301 /scriptflow/;
}
location = /creation-flow-app/ {
return 301 https://$host/creation-flow-app/login;
}
location / {
location ^~ /scriptflow/ {
rewrite ^/scriptflow/(.*)$ /$1 break;
root /app;
index index.html;
try_files $uri $uri/ /index.html;

View File

@ -6,6 +6,7 @@ import {defineConfig, loadEnv} from 'vite';
export default defineConfig(({mode}) => {
const env = loadEnv(mode, '.', '');
return {
base: '/scriptflow/',
plugins: [react(), tailwindcss()],
define: {
'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY),
@ -17,7 +18,7 @@ export default defineConfig(({mode}) => {
},
server: {
// HMR is disabled in AI Studio via DISABLE_HMR env var.
// Do not modify—file watching is disabled to prevent flickering during agent edits.
// Do not modify芒聙聰file watching is disabled to prevent flickering during agent edits.
hmr: process.env.DISABLE_HMR !== 'true',
},
};