Skip to content

Instantly share code, notes, and snippets.

@jacobparis
jacobparis / _patch issue
Last active July 26, 2024 23:53
The final hunk in this patch fails and I don't know why
patch package.json < package.json.patch
@jacobparis
jacobparis / timing.server.ts
Created April 29, 2023 23:24
Server Timing Utilities for Remix
export type PerformanceServerTimings = Record<
string,
Array<PerformanceServerTiming>
>
/**
* Run this on the server to get a `time` function that can be used to time
* server-side operations and add them to the `Server-Timing` header.
*/
export function getServerTiming() {

remix-route-extensions

This package allows you to specify .route.tsx files anywhere in your /app directory and they will be recognized as routes

Filenames follow the v2 flat routes convention

root.tsx
app
  _layout.route.tsx
@jacobparis
jacobparis / @remix-run+dev+1.15.0.patch
Last active April 27, 2023 21:30
Remix feature folders patch-package
diff --git a/node_modules/@remix-run/dev/dist/compiler/assets.js b/node_modules/@remix-run/dev/dist/compiler/assets.js
index b01942f..8f90ae1 100644
--- a/node_modules/@remix-run/dev/dist/compiler/assets.js
+++ b/node_modules/@remix-run/dev/dist/compiler/assets.js
@@ -95,6 +95,7 @@ async function createAssetsManifest({
routes,
hmrRoutes: hmr === null || hmr === void 0 ? void 0 : hmr.routes
})).slice(0, 8);
+
return {
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@jacobparis
jacobparis / machine.js
Last active April 5, 2020 02:53
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@jacobparis
jacobparis / machine.js
Last active April 5, 2020 02:15
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions