Skip to content

Instantly share code, notes, and snippets.

@mdotk
mdotk / public-router-prefetch-guard.mjs
Created April 29, 2026 20:33
Next.js PPR metadata resume mismatch public router.prefetch guard workaround
#!/usr/bin/env node
import fs from "node:fs";
import path from "node:path";
import process from "node:process";
const frontendDir = path.resolve(path.dirname(new URL(import.meta.url).pathname), "..");
const sourceDir = path.join(frontendDir, "src");
const bannedPattern = /\brouter\.prefetch\s*\(/;
const ignoredPathSegments = [
@mdotk
mdotk / code-editor-rules.md
Created February 11, 2025 22:00 — forked from yifanzz/code-editor-rules.md
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]