Repository navigation
fix(docs): bundle all former docs/shared helpers under app/utils - #6
Merged
Merged
Conversation
Relative imports from docs/shared were externalized with path-depth-dependent rollup IDs, breaking Nitro prerender on Workers Build. Colocate build helpers in app/utils and import via ~/utils or ./app/utils from nuxt.config. Co-authored-by: froQ <sayhola@froq.me>
0froq
marked this pull request as ready for review
October 15, 2026 05:11
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.
Problem
PR #5 fixed
site.tsonly. Workers Build still fails at Nitro prerender:The failure depends on checkout path depth (
/opt/buildhome/repovs/workspace). Vite externalizeddocs/shared/*with broken relative IDs instead of bundling them.Fix
Move all remaining
docs/shared/*modules intodocs/app/utils/:component-files.ts,empty-title.ts,public-files.tsUpdate imports:
nuxt.config.ts→./app/utils/...app/utils/components.ts→~/utils/component-filesRemove
docs/shared/(Nuxt#sharedalias is unused; config cannot import#sharedbefore Nuxt boots).Adjust
public-filespublic root to../../publicfromapp/utils.Verification
Fresh tree at
/opt/buildhome/repo(clean clone layout similar to Workers Build):NODE_VERSION=22 pnpm install --frozen-lockfile && pnpm generate/_og/s/*.pngprerendered).grep -r 'docs/shared' docs/.nuxt/dist docs/.output→ no matches.pnpm checkpasses.