-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Target branch
All PRs must branch from next/v3 and target base next/v3 (not main).
Context
The reconciliation report in #379 shows multiple post-merge-base main fixes around output path resolution that have not been applied to next/v3.
These fixes are largely about correctness across platforms (Windows separators, macOS/Linux absolute-vs-relative behavior) and should be portable to next/v3 without changing its Node/React ranges.
Scope (files/areas)
packages/jsx-email/src/cli/commands/build.tspackages/jsx-email/src/renderer/compile.tstest/cli/**and/orpackages/jsx-email/test/**(only if new targeted coverage is needed)
Tasks
- Port
main’s build output path fix:- Replace
baseDir.replace(outputBasePath, '')with apath.relative(outputBasePath, baseDir)-based approach. - (Evidence on
main:d2360902inpackages/jsx-email/src/cli/commands/build.mts.)
- Replace
- Port
main’s compile metafile output path fix:- When converting esbuild metafile output keys into real paths, resolve against the original CWD (not
resolve('/', key)), mirroringmain. - Ensure
.meta.jsonwrite paths still land next to the compiled output. - (Evidence on
main:5e1bc8c3inpackages/jsx-email/src/renderer/compile.ts.)
- When converting esbuild metafile output keys into real paths, resolve against the original CWD (not
- Confirm the compile → dynamic import path still works in
buildTemplates()and does not regressJSX_DEV_LOCALpreview workflows. - If existing tests don’t cover this well enough on
next/v3, add one small targeted test (no snapshots) that asserts a nested template compiles and is importable via the returnedCompileResult.path.
Acceptance criteria (done when)
- Nested build output paths are computed correctly without string replacement hacks.
buildTemplates()works when templates live under nested directories.moon jsx-email:testandmoon test-cli:test.runpass.
Verification
# Unit tests
$ FORCE_COLOR=1 moon jsx-email:test
# CLI tests
$ FORCE_COLOR=1 moon test-cli:test.runRefs #379.
Metadata
Metadata
Assignees
Labels
No labels