Commit 82c6205
committed
Drop unused MDX deps and inline use-scramble
First-principles audit of the runtime dep list. Four packages removed:
- react-markdown: zero imports anywhere in the codebase. Velite/MDX is
the actual blog pipeline; this was dead weight.
- @next/mdx: not wired into next.config.mjs (no withMDX() wrapper) and
no .mdx routes under app/. Velite compiles MDX to JSX code that
MDXRenderer.tsx evaluates against react/jsx-runtime.
- @mdx-js/react: zero direct imports. Typically a peer of @next/mdx's
React provider system, which isn't used here. velite depends on
@mdx-js/mdx (the compiler), not @mdx-js/react (the runtime).
- use-scramble: used in exactly one component (custom Link wrapper).
Inlined as a ~50-line rAF loop with an in-flight guard and a
callback ref. Behavior parity preserved: left-to-right reveal,
4-char scramble window, fires on hover/touch, whitespace passes
through unscrambled. Switched from onMouseOver to onMouseEnter
because mouseOver re-fires every time textContent mutates (browsers
emit it on child-node changes), which would restart the animation
in an infinite loop.
The mdast-util-to-hast override stays — its two remaining transitive
paths (shiki/rehype-pretty-code and velite/@mdx-js/mdx) still resolve
to a pre-fix version without the override. CLAUDE.md updated to drop
the now-removed react-markdown path from the rationale.
bun audit, lint, typecheck, build, verify (17/17), and Playwright
(18/18 including a new footer-scramble regression test that guards
against the mouseover-textContent-refire loop) all pass.
Signed-off-by: Will Manning <will@willmanning.io>1 parent 1114b9b commit 82c6205
5 files changed
Lines changed: 86 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
| |||
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
36 | | - | |
37 | 34 | | |
38 | 35 | | |
39 | | - | |
40 | 36 | | |
41 | 37 | | |
42 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
20 | 63 | | |
21 | 64 | | |
22 | 65 | | |
23 | 66 | | |
24 | | - | |
25 | | - | |
| 67 | + | |
| 68 | + | |
26 | 69 | | |
27 | 70 | | |
28 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
102 | 132 | | |
103 | 133 | | |
104 | 134 | | |
| |||
0 commit comments