Enhance Turbopack support and improve loader functionality (retry)#70
Open
maxblank-stripe wants to merge 1 commit into
Open
Enhance Turbopack support and improve loader functionality (retry)#70maxblank-stripe wants to merge 1 commit into
maxblank-stripe wants to merge 1 commit into
Conversation
…ality (#…" This reverts commit 975d561.
|
I primarily use linux and macOS. Let me see if I can find the time to boot windows and get this figured out. |
esetnik
added a commit
to ProdigyEMS/prodigy-documentation-site
that referenced
this pull request
Jul 7, 2026
* feat: build with turbopack via a markdoc loader shim Removes --webpack from build and dev. @markdoc/next.js 0.5.0's own Turbopack support is broken three ways: createTurbopackConfig omits the dir/pagesDir options its loader requires; the loader's bare schema-specifier resolution fails under Turbopack's compat resolver and silently produces an empty schema; and it emits absolute-path imports Turbopack rejects. The upstream fix (markdoc/next.js#67) was merged then reverted over a Windows CI snapshot failure; the retry (markdoc/next.js#70) is open. Until that ships, markdoc-turbopack-loader.js delegates to the unmodified upstream loader with a Node-based resolver that returns schema imports relative to each .md file, wired through a hand-written turbopack.rules entry with the full option set. The webpack config is stripped from the final Next config (webpack builds no longer compile .md pages). Remove the shim when @markdoc/next.js >= 0.6.0 lands. Verified: turbopack build green (29/29 routes, .md pages SSG with getStaticProps), smoke 200/200/200/404, markdoc content renders, docs page height matches baseline (9697), dev mode boots on Turbopack and serves .md pages, lint clean, deliberate server throw captured in Sentry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NhGWp3geXAjzZ1roRdUDNr * fix(sentry): server-init fallback + explicit api wrap for netlify turbopack builds The PR's preview check caught server-side capture silently broken on the Netlify Lambda with the Turbopack build (local capture works; verified by markers). Root cause class: the Netlify runtime does not reliably load instrumentation.js (opennextjs-netlify#3503), and with Turbopack output the static-import workaround no longer takes effect. - src/lib/sentry-server-fallback.js: idempotent server-only init imported from _app (guards: typeof window, getClient(), DSN present) - /api/sentry-test explicitly wrapped with wrapApiHandlerWithSentry since API routes are not covered by pages/_error and onRequestError never registers when instrumentation is skipped Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NhGWp3geXAjzZ1roRdUDNr * fix(sentry): merge turbopack config instead of clobbering sentry's debugIds flag Root cause of the unsymbolicated server frames: replacing finalConfig.turbopack wholesale deleted debugIds: true (Sentry relies on Turbopack's NATIVE debug-id emission on Next 16 and skips its own injection when it believes native IDs are active) plus Sentry's instrumentation rules. Merge only our '*.md' rule instead. Verified: 45 server chunks including the API route chunk now carry //# debugId= with matching map keys. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NhGWp3geXAjzZ1roRdUDNr --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
|
Opened #72 against this branch with the Windows CI fix — the failures were three real cross-platform bugs (emitted import separators, emitted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Retries #67 because CI actions were not triggered in the original PR and failed post-merge.
@DeeeeLAN can you try running
npm run test -- -uto update jest snapshots if you're working on a windows machine? It doesn't change anything on macos and CI fails for the windows test builds. Thanks!