Repository navigation
Commit 35ffdfa
committed
fix: ESM-proof the api function imports; inline the OG layout
Follow-up to the repoSocial move — two more tracer/runtime mismatches
kept api/og crashing:
- The package is type:module, so compiled functions run as Node ESM and
extensionless relative specifiers never resolve. All cross-file api
imports now carry explicit .js extensions (TS, Vite, and vitest all
resolve .js -> .ts natively).
- The tracer maps .js specifiers to .ts sources but not .tsx, so an
imported .tsx module is silently dropped from the bundle. og-layout is
inlined into the og.tsx entrypoint (entrypoint .tsx compiles fine);
its exports remain for the tests.
Verified against a local vercel build: both compiled functions import
cleanly under node --input-type=module, and GET on og.js renders a real
200 image/png including the traced JetBrains Mono TTFs.1 parent 04e8e8b commit 35ffdfa
8 files changed
Lines changed: 563 additions & 559 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments