e30e75b5d4
Changesets / Create Version PR (push) Has been cancelled
Deploy Shadcn Registry / Deploy Production (push) Has been cancelled
Template Metrics / LOC + Bundle Size (push) Has been cancelled
Code Quality / Oxlint + Oxfmt (push) Has been cancelled
Code Quality / Template Sync (push) Has been cancelled
Code Quality / Build Changed Packages (push) Has been cancelled
Code Quality / Test Changed Packages (push) Has been cancelled
Deploy Expo Example / Deploy Production (push) Has been cancelled
Deploy Ink Example / Deploy Production (push) Has been cancelled
Python Tests / pytest (assistant-stream, 3.10) (push) Has been cancelled
Python Tests / pytest (assistant-stream, 3.12) (push) Has been cancelled
Python Tests / pytest (assistant-ui-sync-server-api, 3.10) (push) Has been cancelled
Python Tests / pytest (assistant-ui-sync-server-api, 3.12) (push) Has been cancelled
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import { defineConfig } from "vite";
|
|
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
|
|
import viteReact from "@vitejs/plugin-react";
|
|
import viteTsConfigPaths from "vite-tsconfig-paths";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import { nitro } from "nitro/vite";
|
|
|
|
const config = defineConfig({
|
|
build: {
|
|
rolldownOptions: {
|
|
external: ["shiki/wasm"],
|
|
},
|
|
},
|
|
ssr: {
|
|
external: ["shiki/wasm"],
|
|
},
|
|
plugins: [
|
|
nitro({
|
|
output: {
|
|
dir: "dist",
|
|
},
|
|
// Nitro enables wasm by default, which adds the "unwasm" export
|
|
// condition. That routes `shiki/wasm` to its raw `onig.wasm` file, which
|
|
// Vite/Rolldown cannot load during the SSR build ([UNLOADABLE_DEPENDENCY]).
|
|
// Disabling it resolves `shiki/wasm` to its base64-inlined default — same
|
|
// Oniguruma engine, no separate .wasm asset.
|
|
wasm: false,
|
|
}),
|
|
viteTsConfigPaths({
|
|
projects: ["./tsconfig.json", "../../packages/ui/tsconfig.json"],
|
|
}),
|
|
tailwindcss(),
|
|
tanstackStart(),
|
|
viteReact(),
|
|
],
|
|
});
|
|
|
|
export default config;
|