v0.10.5 首页 H2 产品线入口 ×6:ImageBoxWidget 重构为 Elementor 忠实 DOM + slim 白名单补齐 + H2 scoped CSS(post-18 对齐,桌面/移动/hover 实测一致)

This commit is contained in:
BigCode
2026-11-01 00:15:29 +08:00
commit 5b83e71ad9
128 changed files with 20008 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
import { defineConfig } from "vite";
import tsConfigPaths from "vite-tsconfig-paths";
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import path from "node:path";
import { fileURLToPath } from "node:url";
// 兼容 Node/Bun 双运行时的项目根定位
const here = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
server: { port: 3311 },
build: {
// Bun 内置模块(Bun.sql)不打包,生产用 bun 运行时启动 dist/server/server.js
rolldownOptions: { external: ["bun"] },
},
// 客户端环境用 stub 解析 "bun"(db 模块经 server fn 依赖链进入客户端图,
// 动态 import("bun") 只在服务端执行)
environments: {
client: {
resolve: {
alias: [{ find: /^bun$/, replacement: path.resolve(here, "src/stubs/bun-client.ts") }],
},
},
},
plugins: [
tsConfigPaths({ projects: ["./tsconfig.json"] }),
tailwindcss(),
tanstackStart(),
react(),
],
});