Storybook: Handle production module load failures - #81867
Conversation
|
Size Change: 0 B Total Size: 7.74 MB |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Flaky tests detected in 4559721. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/32358276178 inserts a block in proper place after having clicked `Browse All` from block appender in
|
What?
Makes the production Storybook more resilient to intermittent dynamic module load failures.
Why?
The production site can request hundreds of story dependencies at once. A single transient GitHub Pages or CDN failure causes the complete story import to fail, even when the story module itself returns
200.How?
vite:preloadErrorwith one guarded full-page reload.See Vite's load error handling guidance.
Testing Instructions
npm run storybook:build.storybook/buildand open/?path=/story/design-system-components-menu--default.window.dispatchEvent( new Event( 'vite:preloadError', { cancelable: true } ) );.Testing Instructions for Keyboard
Not applicable. This changes Storybook asset loading and does not change keyboard interaction.
Screenshots or screencast
Here's what the typical failure looks like
Use of AI Tools
This pull request was implemented with Codex. The investigation used browser inspection, a HAR export, generated build analysis, and local automated verification. The author reviewed the resulting changes.