Created
March 10, 2026 20:45
-
-
Save lostintangent/8c02646c7f5e6ee843896a8220e8b44c to your computer and use it in GitHub Desktop.
Foo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 { nitro } from "nitro/vite"; | |
| import tailwindcss from "@tailwindcss/vite"; | |
| const config = defineConfig(({ mode }) => { | |
| const isProduction = mode === "production"; | |
| return { | |
| server: { | |
| host: "::", | |
| allowedHosts: [".ts.net"], | |
| }, | |
| plugins: [ | |
| tailwindcss(), | |
| nitro({ | |
| preset: "bun", | |
| plugins: ["./src/server/plugins/automationScheduler.ts"], | |
| features: { | |
| websocket: true, | |
| }, | |
| serveStatic: isProduction ? "inline" : false, // Inline only for production | |
| rollupConfig: { | |
| onwarn(warning, defaultHandler) { | |
| if ( | |
| warning.code === "MODULE_LEVEL_DIRECTIVE" && | |
| warning.message.includes("use client") | |
| ) { | |
| return; | |
| } | |
| if ( | |
| warning.plugin === "unwasm" && | |
| warning.message.includes("Failed to load the WebAssembly module") | |
| ) { | |
| return; | |
| } | |
| defaultHandler(warning); | |
| }, | |
| }, | |
| }), | |
| viteTsConfigPaths({ | |
| projects: ["./tsconfig.json"], | |
| }), | |
| tanstackStart(), | |
| viteReact(), | |
| ], | |
| }; | |
| }); | |
| export default config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment