Skip to content

Fresh 2 + Vite keeps rebuilding on Windows #3637

@FredslundMagnus

Description

@FredslundMagnus

Fresh 2 + Vite keeps rebuilding on Windows, when some tempory files are changed and I cannot disable it:

import { defineConfig } from "vite";
import { fresh } from "@fresh/plugin-vite";
import tailwindcss from "@tailwindcss/vite";

export default defineConfig({
  plugins: [
    fresh(),
    tailwindcss(),
  ],
  server: {
    watch: {
      // Don't watch test files, temp files, or hidden files during development
      // to prevent dev server crashes
      ignored: [
        "**\\*_test.ts*",
        "**/*_test.ts*",
        "**\\*.test.ts*",
        "**/*.test.ts*",
        "**\\*.tmp.*",
        "**/*.tmp.*",
        "**\\*.timestamp-*",
        "**/*.timestamp-*",
        "**\\.*",
        "**/.*",
        "**\\encrypted\\**",
        "**/encrypted/**",
        "**\\kv\\**",
        "**/kv/**",
        "vite.config.*",
        "encrypted\\kv\\main-shm",
        "encrypted/kv/main-shm",
        "encrypted\\kv\\main-wal",
        "encrypted/kv/main-wal",
        "node_modules\\**",
        "node_modules/**",
        "**/*",
        "**\\*",
        "**",
        "*",
      ],
    },
  },
});

I also tried:

import { defineConfig } from "vite";
import { fresh } from "@fresh/plugin-vite";
import tailwindcss from "@tailwindcss/vite";

export default defineConfig({
  plugins: [
    fresh(),
    tailwindcss(),
  ],
  server: {
    watch: null,
  },
});

I got it working on wsl, and I've tried with both path type \ and /, but it keeps rebuilding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions