Skip to content

Fix docs examples crashing on exclusiveSlot by compiling iterable spread correctly - #617

Merged
dannyleech merged 1 commit into
mainfrom
docs-babel-iterable-spread
Oct 21, 2026
Merged

dannyleech merged 1 commit into
mainfrom
docs-babel-iterable-spread

Conversation

@dannyleech

Copy link
Copy Markdown
Contributor

Since #613, every example on the docs site has crashed with Cannot read properties of undefined (reading 'exclusiveSlot'). Docusaurus compiles the map's source with loose Babel, which turns [...map.values()] into [].concat(map.values()), an array holding the iterator instead of its values. This adds a custom jsLoader that keeps the Docusaurus defaults but sets iterableIsArray: false for src, plugins and providers, and adds @docusaurus/babel as a dev dependency. It also fixes two existing Sonar and type warnings in the config. The package builds and tests don't use this config, so they aren't affected.

@sonarqubecloud

Copy link
Copy Markdown

@dannyleech
dannyleech merged commit bd88e37 into main Oct 21, 2026
2 checks passed
@dannyleech
dannyleech deleted the docs-babel-iterable-spread branch October 21, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant