feat(html): generate VJSC skin templates - #2546
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ea9e50b to
24702db
Compare
@videojs/core
@videojs/element
@videojs/html
@videojs/media
@videojs/react
@videojs/spf
@videojs/store
@videojs/utils
commit: |
📦 Bundle Size Report🎨 @videojs/html
Small changes (11, ≤ 300 B)
Presets (7)
Media (18)
Extensions (2)
Players (5)
Skins (29)
UI Components (62)
⚛️ @videojs/react — no changesPresets (7)
Media (22)
Extensions (2)
Players (5)
Skins (18)
UI Components (39)
🧩 @videojs/core — no changesEntries (76)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (13)
📦 @videojs/media
Entries (23)
📦 @videojs/spf — no changesEntries (10)
ℹ️ How to interpretEach entry is independently bundled, minified, and brotli-compressed. Initial size includes its static import graph; lazy dynamic chunks are reported separately. Entries are not additive because their dependency graphs overlap. Preset rows represent realistic combined bundles. Changes of 300 B or less across initial, lazy, and total size are collapsed, not discarded. Run |
2f7b5c3 to
3b8cc7f
Compare
3b8cc7f to
4b7721a
Compare
4b7721a to
b79da46
Compare
b79da46 to
7f75f96
Compare
7f75f96 to
fb0cb1b
Compare
fb0cb1b to
107771e
Compare
107771e to
bc246bb
Compare
5338a22 to
088235c
Compare
088235c to
323930c
Compare
323930c to
6b5ec1d
Compare
6b5ec1d to
4a768ae
Compare
4a768ae to
3a1fac4
Compare
3a1fac4 to
d3b2371
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d3b2371. Configure here.
| }, | ||
| "scripts": { | ||
| "check:cdn": "node --import tsx ./scripts/check-cdn-self-contained.ts", | ||
| "check:cdn": "node --import tsx ./scripts/check-cdn-self-contained.ts && node --import tsx ./scripts/check-cdn-skins.ts", |
There was a problem hiding this comment.
Skin registers omitted from sideEffects
High Severity
Generated skin register modules are side-effect-only (bare define/ui/* imports plus registerIcons()), but package.json sideEffects still lists only define/**, i18n, and icon element paths. The Vite pack config now treats /internal/skins/*/register as side-effectful so this package's own build keeps them; consumer bundlers that honor sideEffects (webpack, Vite/Rollup production) do not. Importing a skin or preset can drop the register graph, leave template tags as plain HTMLElement, and throw on methods such as setSyncedText.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit d3b2371. Configure here.


Closes #2493
Parent issue: #2185
Summary
Verification
pnpm -F @videojs/html testpnpm -F @videojs/skins testpnpm exec vp run @videojs/html#build --forcepnpm exec vp run @videojs/html#build:cdn --forcepnpm -F @videojs/html check:cdnpnpm exec vp run @videojs/skins#validate:shadcn --forcepnpm typecheckpnpm lintpnpm check:workspaceStack
Note
Medium Risk
Touches custom-element registration boundaries, CDN skin bundles, and generated artifacts consumers rely on; regressions could break partial UI imports or CDN players without the new checks catching them.
Overview
Generates all eight HTML default/minimal skins from the canonical VJSC graph into gitignored
packages/html/src/internal/skins/(statictemplate.ts, computedregister.ts, and fullskin.css). Tracked preset anddefine/*/skinfacades now only wire those outputs—large inline shadow markup and@videojs/skinsCSS imports are removed, and@videojs/htmlno longer depends on@videojs/skinsat build time.Skin entries load an explicit UI closure via generated
registermodules instead of preset-localuicomposites. Directdefine/ui/*paths register one custom element each (new granular entries for menu/slider/tooltip parts); compositeui-compoundsregistration is dropped, with tests updated for skin vs player boundaries.Build and distribution:
@videojs/htmlbuild depends on@videojs/skins#generate; Vite treats generatedregisteras side-effectful.check-cdn-skinsasserts dev/prod CDN bundles include templates, registrations, complete CSS, source maps, and no VJSC runtime.@videojs/skinsadds HTML package generation, Shadcn registry blocks for HTML skins (Tailwind/CSS), and HTML Vite fixture validation alongside React.Reviewed by Cursor Bugbot for commit d3b2371. Bugbot is set up for automated code reviews on this repo. Configure here.