Repository navigation
perf: let nodeps.js use the host's Vuetify instead of bundling a second copy - #350
Merged
Merged
Conversation
maartenbreddels
marked this pull request as ready for review
October 6, 2026 08:38
nodeps.js is the bundle for Solara, whose page already has Vue and Vuetify. It still bundled Vuetify's components, directives and a scoped copy of Vuetify's CSS: about 2.6 MB raw and 354 KB gzip on every Solara page. The Vuetify plugin now comes from a small module. In the two nodeps builds, webpack swaps it for one that returns the host's plugin (window.vuetifyPlugin), so the components, directives and CSS are no longer bundled. The DatePicker wrapper resolves VDatePicker from the app instead of importing it, which would bundle it again. index.js and the labextension still bundle Vuetify, so Jupyter does not change. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rting it Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
maartenbreddels
force-pushed
the
perf/nodeps-host-vuetify-min
branch
from
October 6, 2026 08:51
d50f66d to
6a8cb64
Compare
maartenbreddels
added a commit
to widgetti/solara
that referenced
this pull request
Oct 6, 2026
…y's CSS ipyvuetify 3.1.0 (widgetti/ipyvuetify#350) makes nodeps.js use the host's Vuetify, so -vuetify-css now removes all of Vuetify's stylesheet there. The sentence said this was true for ipyvuetify in general. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
nodeps.js, the bundle Solara loads, now uses the Vuetify of the host page instead of a second copy: 2.6 MB to 120 KB (354 to 18 KB gzip). This replaces #346 with the smallest change that gets the same win.Problem
Solara pages already have Vue and Vuetify.
nodeps.jsstill bundles Vuetify's components, directives and a scoped copy of Vuetify's CSS, so every Solara page downloads and runs a second Vuetify: 354 KB gzip.Change
js/src/vuetifyPlugin.js: thecreateVuetify(...)call moves here fromVuetifyView.js, unchanged.js/webpack.config.js: the twonodepsbuilds swap that module forjs/src/nodepsVuetifyPlugin.js, which returns the host'swindow.vuetifyPlugin. It throws a clear error if the host has none.js/src/VuetifyApp.js: the DatePicker wrapper getsVDatePickerwithresolveComponentinstead of importing it, because the import would bundle it again.index.jsand the labextension still bundle Vuetify, so Jupyter does not change.Validation
nodeps.js: 2,594,705 to 120,327 bytes raw, 353,753 to 17,932 gzip. It has nov-data-tablestring and no scoped Vuetify CSS.index.jsis the same size as on master within 50 bytes.v.Btnand a button in av-menurender.button_test.pygives the same screenshot as released 3.0.0 on the same machine.window.vuetifyPluginwas cached asundefinedand failed later with an unclear error; the clear error now throws before anything is cached.Gaps
VDatePicker, do not render there. Released 3.0.0 already failed on those versions in other ways.Align results
Caution
/alignwas not run on this change: Maarten asked to replace #346 with a much smaller PR.Crossreview results
One round, by astra and gpt-6.1-sol. gpt-6.1-sol: MEDIUM, a missing host plugin was cached as
undefined; fixed in this commit with a clear error that throws before caching. astra: no defects.🤖 Generated with Claude Code