fix: harden WeKnora proxy and configurable search

This commit is contained in:
Administrator committed 2026-08-13 23:44:47 +08:00
1 parent b527bc94bb
commit 11e54550ed
10 files changed
+721 -72

No files matched your search

+28 -28
View File
@@ -5,22 +5,22 @@ import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import sourceIdentifierPlugin from "vite-plugin-source-identifier";
const rootDir = fileURLToPath(new URL(".", import.meta.url));
// Tailwind 4 emits CSS cascade layers, which require Chrome 99+. Chrome 100
// is therefore the practical lower bound for this Win7 legacy build.
const LEGACY_CHROME = 100 << 16;
const rootDir = fileURLToPath(new URL(".", import.meta.url));
// Tailwind 4 emits CSS cascade layers, which require Chrome 99+. Chrome 100
// is therefore the practical lower bound for this Win7 legacy build.
const LEGACY_CHROME = 100 << 16;
export default defineConfig({
plugins: [sourceIdentifierPlugin(), react()],
css: {
// Also used by the production CSS minifier. Development CSS is handled
// by the matching PostCSS compatibility pass in postcss.config.js.
lightningcss: {
targets: {
chrome: LEGACY_CHROME,
},
},
},
export default defineConfig({
plugins: [sourceIdentifierPlugin(), react()],
css: {
// Also used by the production CSS minifier. Development CSS is handled
// by the matching PostCSS compatibility pass in postcss.config.js.
lightningcss: {
targets: {
chrome: LEGACY_CHROME,
},
},
},
resolve: {
alias: [
{
@@ -45,19 +45,19 @@ export default defineConfig({
},
],
},
// Keep the current portable-file default, while allowing container builds to
// emit absolute asset URLs. The latter is required for BrowserRouter pages
// behind Nginx: a request to /page/... must still load /assets/... rather
// than /page/assets/....
base: process.env.VITE_ASSET_BASE ?? "./",
build: {
cssMinify: "lightningcss",
target: "chrome100",
},
// Keep the current portable-file default, while allowing container builds to
// emit absolute asset URLs. The latter is required for BrowserRouter pages
// behind Nginx: a request to /page/... must still load /assets/... rather
// than /page/assets/....
base: process.env.VITE_ASSET_BASE ?? "./",
build: {
cssMinify: "lightningcss",
target: "chrome100",
},
server: {
// 与 scripts/env.sh FRONTEND_PORT=5174、圆桌 wujie 嵌入文档一致。
port: 5173,
// 无界宿主跨域 fetch 子应用静态资源时,Vite 需回显请求的 Origin。
cors: true,
// 与 scripts/env.sh FRONTEND_PORT=5174、圆桌 wujie 嵌入文档一致。
port: 5173,
// 无界宿主跨域 fetch 子应用静态资源时,Vite 需回显请求的 Origin。
cors: true,
},
});