feat(next): auto-initialize overlay and runtime from loader preamble#3
Merged
feat(next): auto-initialize overlay and runtime from loader preamble#3
Conversation
Replace DomscribeDevProvider with automatic initialization via the
turbopack loader preamble. The preamble now injects
`import('@domscribe/next/auto-init')` guarded by a
`__DOMSCRIBE_AUTO_INIT__` flag, so runtime + overlay initialize
without requiring a React component in the tree.
- Add @domscribe/next/auto-init side-effect module
- Inject auto-init import in turbopack loader preamble with dedup guard
- Default overlay option to true in withDomscribe()
- Remove DomscribeDevProvider and @domscribe/next/runtime subpath
- Remove DomscribeDevProvider from all Next.js test fixture layouts
BREAKING CHANGE: @domscribe/next/runtime subpath export is removed.
Users no longer need DomscribeDevProvider in their root layout.
…and webpack Add the same console.error filter already present in the turbopack loader preamble to the Vite and Webpack plugins. Suppresses React's "Invalid prop `data-ds` supplied to React.Fragment" warning that fires when a component resolves to Fragment at runtime via a dynamic expression.
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run domscribe-test-fixtures:integration--web... |
✅ Succeeded | 1m 48s | View ↗ |
nx run domscribe-test-fixtures:integration--web... |
✅ Succeeded | 1m 48s | View ↗ |
nx run domscribe-test-fixtures:integration--web... |
✅ Succeeded | 1m 43s | View ↗ |
nx run domscribe-test-fixtures:integration--web... |
✅ Succeeded | 1m 44s | View ↗ |
nx run domscribe-test-fixtures:install-fixture-... |
✅ Succeeded | 37s | View ↗ |
nx run domscribe-test-fixtures:install-fixture-... |
✅ Succeeded | 38s | View ↗ |
nx run domscribe-test-fixtures:install-fixture-... |
✅ Succeeded | 18s | View ↗ |
nx run domscribe-test-fixtures:integration--vit... |
✅ Succeeded | 28s | View ↗ |
Additional runs (18) |
✅ Succeeded | ... | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-03-19 05:22:44 UTC
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.

Summary
DomscribeDevProviderwith automatic initialization via the turbopack loader preamble — the overlay and runtime now initialize without requiring a React component in the treeimport('@domscribe/next/auto-init')guarded by a__DOMSCRIBE_AUTO_INIT__window flag to ensure single execution across multiple transformed filesoverlaytotrueinwithDomscribe()so the overlay appears out of the box@domscribe/next/runtimesubpath export andDomscribeDevProvidercomponent entirelyDomscribeDevProviderfrom all Next.js test fixture layouts (template + generated)Motivation
Vite and standalone webpack integrations auto-initialize without source changes, but Next.js required users to manually add
<DomscribeDevProvider />to their root layout. This caused the overlay to silently not appear on the cal.com demo because the component was missing. This PR eliminates that friction.Breaking change
@domscribe/next/runtimesubpath export is removed. Users should remove<DomscribeDevProvider />from their root layout — it's no longer needed.Test plan
nx test domscribe-transform— turbopack loader tests pass (362 tests), including new preamble auto-init assertionnx test domscribe-next— all 35 tests pass, including 3 new auto-init tests and updated overlay defaultnx integration domscribe-test-fixtures— manifest validation on Next.js fixturesnx e2e domscribe-test-fixtures— overlay appears on Next.js fixtures without DomscribeDevProvider