Skip to content

fix: bundle the Video and Audio JS definitions in the optimized prod bundle - #9966

Merged
ZheSun88 merged 1 commit into
mainfrom
fix/prod-bundle-media-js-definitions
Dec 2, 2026
Merged

ZheSun88 merged 1 commit into
mainfrom
fix/prod-bundle-media-js-definitions

Conversation

@vaadin-bot

Copy link
Copy Markdown
Contributor

Summary

AllComponentsIncludedTest.compareStatsWithUnoptimized fails on main since vaadin/flow#27158 (playback control and state for Video and Audio), e.g. in the PR validation of #9955:

-    "generated/vaadin-js-definitions.js" : "d92a97c6…"
+    "generated/vaadin-js-definitions.js" : "4864819d…"

Media, the base of Video and Audio, now declares JavaScript definitions for play, pause, load, seeking and the playback state. No view of the prod bundle uses Video or Audio, so the optimized build leaves those functions out, while the unoptimized bundle, which scans the whole class path, carries them.

Same kind of fix as #9937: name Audio and Video with @Uses in FakeAppConf.

Test plan

  • Reproduced the failure locally against the current 25.5 snapshots (same hashes as CI).
  • With the change, mvn -Pproduction,ee,oss -pl :vaadin-prod-bundle install passes AllComponentsIncludedTest (2 tests, 0 failures).

🤖 Generated with Claude Code

…bundle

Flow 25.5 (vaadin/flow#27158) gives Media, the base of Video and Audio,
JavaScript definitions for its playback controls and state. No view of
the prod bundle uses Video or Audio, so an optimized build left their
functions out, while the unoptimized bundle, which scans the whole class
path, carried them. AllComponentsIncludedTest.compareStatsWithUnoptimized
fails on the hash of generated/vaadin-js-definitions.js.

Name Audio and Video with @uses, which bundles those definitions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ZheSun88
ZheSun88 merged commit bad6709 into main Dec 2, 2026
9 of 10 checks passed
@ZheSun88
ZheSun88 deleted the fix/prod-bundle-media-js-definitions branch December 2, 2026 08:26
ZheSun88 added a commit that referenced this pull request Dec 2, 2026
…bundle (#9966) (#9967)

Flow 25.5 (vaadin/flow#27158) gives Media, the base of Video and Audio,
JavaScript definitions for its playback controls and state. No view of
the prod bundle uses Video or Audio, so an optimized build left their
functions out, while the unoptimized bundle, which scans the whole class
path, carried them. AllComponentsIncludedTest.compareStatsWithUnoptimized
fails on the hash of generated/vaadin-js-definitions.js.

Name Audio and Video with @uses, which bundles those definitions.

Co-authored-by: Zhe Sun <zhe@vaadin.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants