Skip to content

Slow HMR updates for Vite and Cloudflare #1002

@vrabota

Description

@vrabota

I have a better stack project setup with Alchemy, raised a ticket as well alchemy-run/alchemy#1376

Installed latest project with better-t-stack and there is very laggy to work on local, each change is taking 30-40 seconds to update.

On logs update I see this:

12:18:59 am [vite] (client) hmr update /src/index.css, /src/index.css?direct, /src/routes/index.tsx, /src/routes/index.tsx?tsr-split=component 12:18:59 am [vite] (ssr) hmr update /src/index.css, /@id/virtual:cloudflare/worker-entry [vite] hot updated: virtual:cloudflare/worker-entry 12:19:14 am [vite] (client) hmr update /src/index.css, /src/index.css?direct, /src/routes/index.tsx, /src/routes/index.tsx?tsr-split=component 12:19:14 am [vite] (ssr) hmr update /src/index.css, /@id/virtual:cloudflare/worker-entry [vite] hot updated: virtual:cloudflare/worker-entry
import tailwindcss from "@tailwindcss/vite";
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import viteReact from "@vitejs/plugin-react";
import alchemy from "alchemy/cloudflare/tanstack-start";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig({
  plugins: [tsconfigPaths(), tailwindcss(), tanstackStart(), viteReact(), alchemy()],
  server: {
    port: 3001,
  },
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions