feat: route uvdsl SharedWorker + dynamic chunks under /mashlib-chunks/#397
Open
m5x5 wants to merge 2 commits into
Open
feat: route uvdsl SharedWorker + dynamic chunks under /mashlib-chunks/#397m5x5 wants to merge 2 commits into
m5x5 wants to merge 2 commits into
Conversation
solid-logic's swap to @uvdsl/solid-oidc-client-browser brings in a
SharedWorker (RefreshWorker.js) for background token refresh. uvdsl
constructs the worker URL via \`new URL('./RefreshWorker.js',
import.meta.url)\`, which webpack handles as an asset module.
By default webpack emits the worker at \`/<hash>.js\` (root), where
CSS doesn't serve it. Setting \`assetModuleFilename\` and
\`chunkFilename\` routes both the worker asset and solid-panes'
dynamic-import chunks into \`/mashlib-chunks/\`, where css-mashlib's
matching StaticAssetEntry can serve them.
Refs SolidOS/solid-logic#274
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Routes webpack-emitted runtime assets (dynamic-import chunks and the new uvdsl SharedWorker script) into a predictable subfolder under dist/, aligning Mashlib’s build output with downstream static asset serving expectations (per the coordinated css-mashlib changes), and ensures webpack can resolve the new auth-related browser package.
Changes:
- Configure webpack
output.chunkFilenameto emit dynamic-import chunks underdist/mashlib-chunks/. - Configure webpack
output.assetModuleFilenameto emit worker/asset-module outputs underdist/mashlib-chunks/. - Add
@uvdsl/solid-oidc-client-browseras a runtime dependency (and lockfile update) so webpack can resolve it during bundling.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
webpack.config.mjs |
Routes chunk and asset-module outputs into mashlib-chunks/ under dist/ to match static serving constraints. |
package.json |
Adds @uvdsl/solid-oidc-client-browser dependency needed for bundling/resolution. |
package-lock.json |
Locks the newly added dependency and its transitive requirements. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
assetModuleFilename: 'mashlib-chunks/[hash][ext][query]'andchunkFilename: 'mashlib-chunks/[contenthash].js'route uvdsl's SharedWorker asset and solid-panes' dynamic-import chunks into a known subfolder ofdist/.@uvdsl/solid-oidc-client-browseras a dependency so webpack can resolve the package that solid-logic externalizes.Without the asset routing, the worker file lands at
/<hash>.js(webpack default), where css-mashlib doesn't serve it.Refs SolidOS/solid-logic#274
Coordinated PRs
Should land together with the css-mashlib PR.