feat(examples): add interactive Next.js App Router example - #53
feat(examples): add interactive Next.js App Router example#53Cypher-Aura-19 wants to merge 2 commits into
Conversation
ivoIturrieta
left a comment
There was a problem hiding this comment.
Thanks for adding this example. The production build and all routes work correctly, but I found a few issues to address before merging:
-
The example pins
next@15.5.3, which has a critical React Flight RCE and several high-severity vulnerabilities.pnpm audit --prodcurrently reports 33 vulnerabilities. Please upgrade to at leastnext@15.5.21, regenerate the lockfile, and rerun the audit. -
Running
next buildinside the example still causes Next.js to select the monorepo root because it detects both lockfiles. The build emits a workspace-root warning, and the output trace references the repository-rootpackage.json. Please setoutputFileTracingRootto the example directory innext.config.ts. -
The root
.gitignorenow ignores every__snapshots__/directory in the monorepo. This seems unrelated to the example and could silently hide committed test snapshots. Please remove it or scope it narrowly to the example.
- Upgrade Next.js from 15.5.3 to 15.5.22 (fixes 33 audit vulnerabilities) - Add pnpm overrides for postcss>=8.5.18 and sharp>=0.35.0 to clear remaining transitive vulnerabilities - Set outputFileTracingRoot to __dirname in next.config.ts to prevent workspace-root tracing warning - .gitignore: no __snapshots__/ rule exists in the PR diff, left unchanged Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Thanks for the review. I’ve pushed ec69618 addressing the requested changes:
Verification:
For the |
Summary
Closes #21.
Adds a focused Next.js 15 App Router example demonstrating server-side rendering of an Unlayer Elements email template using
renderToHtml()andrenderToPlainText().Changes
@unlayer/react-elements./email-preview/rawfor accessing the rendered HTML directly.Workspace compatibility
The example is isolated from the root workspace to prevent React 19 dependencies from affecting the repository’s React 18 packages. It consumes the published package like a normal external Next.js application.
The example README also explains how to test local package changes using a packed tarball.
Verification
pnpm installin the example: passedpnpm buildin the example: passedpnpm dev: verified/: returns 200/email-preview: returns 200/email-preview/raw: returns 200 withtext/html; charset=utf-8pnpm build: passed