Skip to content

Instantly share code, notes, and snippets.

@joshmatz
joshmatz / tanstack-cloudflare-hmr-report.md
Created August 5, 2026 15:30
TanStack Start + Cloudflare development HMR failures on joshmatz.com

TanStack Start + Cloudflare development HMR failures on joshmatz.com

TL;DR

I moved joshmatz.com from Hugo to TanStack Start on Cloudflare Workers in February 2026. HMR began failing almost immediately, and it later failed again in July in two distinct ways.

The specific problems we reproduced now appear to be resolved:

  1. An old Cloudflare compatibility flag, added as an early workaround, eventually made the current runtime less stable and caused the development worker to return 500s or stop responding during live HMR.
  2. Cloudflare Vite plugin 1.25.6 selected the wrong Vite module runner for Vite 7.3.1. During SSR HMR this could load two React instances, producing Invalid hook call and null useContext errors while rendering TanStack's HeadContent.
// Generated on 2014-07-08 using generator-angular 0.9.3
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
var modRewrite = require('connect-modrewrite');
@joshmatz
joshmatz / keybase.md
Created February 24, 2015 23:38
keybase.md

Keybase proof

I hereby claim:

  • I am joshmatz on github.
  • I am joshmatz (https://keybase.io/joshmatz) on keybase.
  • I have a public key whose fingerprint is DB07 283B D5A8 4052 DF79 E114 9941 62C1 FF17 D60E

To claim this, I am signing this object:

@joshmatz
joshmatz / _respond-to.scss
Last active December 13, 2015 22:59
SCSS Mixin for creating media queries when needed. Supports lists as a parameter for use with multiple media queries.
/**
* Supports lists as a parameter for use when you want to select multiple media queries.
* @include respond-to(palm, phablet, lap) { .sub-nav { display: none; }}
*/
@mixin respond-to($media...) {
$response-count: 0;
$query: '';
@each $medium in $media {
@joshmatz
joshmatz / grid.scss
Last active December 12, 2015 00:49
Generate multiple grids for use in different media queries with an SCSS grid generator. Utilizes %placeholder selectors to keep these classes out of the final CSS document.
/*
// Generate default grid
//
$total-columns: 12;
$column-width: 60px;
$gutter: 24px;
$column-name: span;
$normal-width: ($total-columns * $column-width) + (($total-columns - 1) * $gutter); // use for media query
@include grid-generator($total-columns, $column-width, $gutter, $column-name);