-
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
From the reconciliation report in #379, several post-merge-base main fixes around preview/deploy builds and preview static assets are not present in next/v3.
This bucket should also coordinate with (and likely subsume) the existing Windows-focused tracking issue #366.
Scope (files/areas)
packages/jsx-email/src/cli/commands/preview.tspackages/jsx-email/src/cli/vite-static.tstest/cli/**(add/port the targeted preview build-path test)
Tasks
- Port the
mainfix that normalizes glob paths passed toglobby()for preview static assets:- In
packages/jsx-email/src/cli/vite-static.ts, apply Vite-stylenormalizePath()to each configured glob before callingglobby(). - (Evidence on
main:cb00aa67touchedpackages/jsx-email/src/cli/vite-static.mts.)
- In
- Align
email preview --build-pathbehavior withmain:- Allow relative
--build-pathvalues (resolve against the original CWD). - Keep absolute paths working unchanged.
- Update help text so it no longer claims “absolute only”.
- (Evidence on
main:b7eaa939inpackages/jsx-email/src/cli/commands/preview.mts.)
- Allow relative
- Port the
mainfix that removes Rollup externals for deployable preview builds:- In
buildDeployable’s Vite config, do not markreact/jsx-runtimeas external. - (Evidence on
main:0954a3d3inpackages/jsx-email/src/cli/commands/preview.mts.)
- In
- Port/restore Windows drive-letter handling used by
mainfor Vite root/build-path interactions (if still applicable innext/v3’s structure). - Add/port the targeted CLI regression test from
main:test/cli/preview-build-path.test.ts(adapt as needed fornext/v3)
Acceptance criteria (done when)
email preview ./templates --build-path ./.deployworks (writes output under the resolved path) and does not break absolute paths.- Preview static assets are served correctly when globs contain Windows path separators.
- Deployable preview build no longer relies on
react/jsx-runtimebeing externalized. - The new/ported CLI test passes.
Verification
# CLI tests
$ FORCE_COLOR=1 moon test-cli:test.run
# Preview-related unit tests
$ FORCE_COLOR=1 moon jsx-email:test
# Optional (if/when smoke is working again)
$ moon test-smoke:runRefs #379.
Metadata
Metadata
Assignees
Labels
No labels