react-spectrum
f3cd2145 - fix(sb10): disable FEATURES.highlight to avoid Parcel CJS circular-dep crash

Commit
27 days ago
fix(sb10): disable FEATURES.highlight to avoid Parcel CJS circular-dep crash Parcel bundles storybook/internal/preview-api and chunk-SZQXB3JV.js into a CJS bundle with a circular dependency. During initialization, the chunk's top-level highlight/preview.ts runs `(_previewApi.addons)?.ready` before the preview-api chunk's lazy getter has resolved its internal chunk reference. Result: `TypeError: Cannot read properties of undefined (reading 'addons')` fires as an unhandled promise rejection and the preview never initializes. The line is guarded by `globalThis?.FEATURES?.highlight && ...` so setting features.highlight=false short-circuits the buggy codepath. Trade-off: disables the highlight feature used by addon-a11y for accessibility-violation visualization. This is a workaround; the underlying Parcel + SB10 bundling interaction should be investigated as a follow-up.
Author
Parents
Loading