feat(webui): add opt-in MaiBot appearance overlay

This commit is contained in:
DrSmoothl committed 2026-10-21 13:07:44 +08:00
1 parent 28f64113e7
commit 5cd4ae61dd
29 files changed
+1424 -315

No files matched your search

+15 -1
View File
@@ -3,11 +3,25 @@ import { fileURLToPath } from 'node:url';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tailwindcss from '@tailwindcss/vite';
import { injectWebuiTarget, resolveWebuiTarget } from '@snowluma/common/webui-target';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
plugins: [tailwindcss(), react()],
plugins: [
tailwindcss(),
react(),
{
name: 'webui-runtime-target',
// Production builds are target-neutral. Core injects the deployment at request time.
apply: 'serve',
transformIndexHtml: {
order: 'pre',
handler: (html) =>
injectWebuiTarget(html, resolveWebuiTarget(process.env.SNOWLUMA_WEBUI_TARGET)),
},
},
],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),