Skip to content
Discussion options

You must be logged in to vote

Finally figured this one out. Had to update my vite config to ignore the DB file. Writes to the local DB were triggering HMR or whatever, causing the behavior:

import tailwindcss from '@tailwindcss/vite'
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
import { defineConfig } from 'vite'
import tsConfigPaths from 'vite-tsconfig-paths'

export default defineConfig({
  server: {
    port: 3000,
    watch: {
      // Ignore wrangler files, namely local D1 SQLite DB. Otherwise these trigger reload when written to:
      ignored: ['**/.wrangler/**'],
    },
  },
  plugins: [
    tsConfigPaths({
      projects: ['./tsconfig.json'],
    }),
    tanstackStart({
      target: 'clo…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by GarrisonBates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant