-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat(nuxt): client only page #25037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat(nuxt): client only page #25037
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
0b653bc
refactor: allow wraping route component into `ClientOnly`
logotip4ik e3d63de
test: add tests for client only page
logotip4ik a0e28b9
chore: add `clientOnly` option to `PageMeta` interface
logotip4ik 821a9c8
docs: mention `clientOnly` in definePageMeta
logotip4ik 44e0750
fix ? wrap transition into client only
logotip4ik 2a62ce0
test: type errors array and push only error text
logotip4ik 4a568f8
Update docs/2.guide/2.directory-structure/1.pages.md
logotip4ik 6f69fbc
Update packages/nuxt/src/pages/runtime/composables.ts
logotip4ik 16e2761
Revert "fix ? wrap transition into client only"
logotip4ik 39eb07f
wip rexport page component wrapped in createClientOnly
logotip4ik 7221021
Merge branch 'main' into feat/client-only-page
logotip4ik d4c58fa
Merge branch 'main' into feat/client-only-page
logotip4ik b15125a
Reapply "fix ? wrap transition into client only"
logotip4ik ff16d81
is it really that broken ?
logotip4ik 93bf622
Merge branch 'main' into feat/client-only-page
logotip4ik eaba14f
chore: invert if check
logotip4ik 51167ff
refactor: reexport page component
logotip4ik 8488b56
fix: export undefined if page source is empty
logotip4ik ba79c79
fix: only retest for client only page if not seen one yet
logotip4ik 17caed5
fix: check macro page imports for definePageMeta macro
logotip4ik 03703c4
refactor: remove not needed query for page component import
logotip4ik f8f5d9e
test: add little delay to account for vue transition
logotip4ik 48a37cf
Merge branch 'main' into feat/client-only-page
logotip4ik 0625b61
chore: pretend we are import from a file
logotip4ik f1598b1
chore: stub page wrapper file
logotip4ik a2fcafd
test: bump a bit delay
logotip4ik d462b0c
fix: actually add page wrapper stub file only for webpack
logotip4ik ef82a21
Merge remote-tracking branch 'origin/main' into feat/client-only-page
danielroe bcb046f
test: rename index client only page to index.client
logotip4ik 7aff470
test: remove not needed `definePageMeta` call
logotip4ik 994831b
refactor: add mode to page meta type
logotip4ik a273877
refactor: strip `client` extension from page segment and apply clientβ¦
logotip4ik 6ae06e1
refactor: pass nuxt pages to page wrapper plugin to check for client β¦
logotip4ik 5fc8063
refactor: use route meta to check if client mode is enabled
logotip4ik dd52fec
refactor: more consistent plugin naming
logotip4ik b9b648e
Merge branch 'main' of github.com:logotip4ik/nuxt into feat/client-onβ¦
logotip4ik ad9797e
refactor: try to reexport page wrapped in createClienOnly
logotip4ik 70409eb
chore: Remove not used plugin
logotip4ik ad55085
chore: less diff
logotip4ik c610822
chore: even less diff
logotip4ik 4fadacf
chore: allow all page modes beeing the query value
logotip4ik d1417f5
Merge branch 'main' into feat/client-only-page
logotip4ik e831dca
Merge branch 'main' of github.com:logotip4ik/nuxt into feat/client-onβ¦
logotip4ik f778228
fix: finally it works
logotip4ik 087e038
chore: remove not used plugin
logotip4ik a3e7ef2
chore: cleanup type
logotip4ik 3834257
chore: cleanup imports
logotip4ik 68feb8b
chore: better description wording
logotip4ik 3cefe8f
chore: run lint
logotip4ik 5738bfe
chore: add no side effects to createClientPage
logotip4ik 8e6ecd8
docs: add client only section in pages
logotip4ik da85070
docs: cleanup meta section
logotip4ik 899ff0f
fix: allow passing down page props
logotip4ik 6d240ce
chore: revert server replacement control flow changes
logotip4ik 6f2620a
chore: use else-if to prevent double check
logotip4ik 1a28d8d
Merge remote-tracking branch 'origin/main' into feat/client-only-page
danielroe 86de839
style: lint
danielroe 66fa33f
docs: add additional line
danielroe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: pretend we are import from a file
- Loading branch information
commit 0625b6105bf9120be2c5f8390e65f0448bf84cad
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we bundle
createClientOnly
even if the page is not client only in some cases ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should bundle
ClientOnly
component only if at least one of the pages are client onlyUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah... can we instead wrap the page component competly with
createClientOnly
? Probably at build time with unplugin that wrap the export of the SFC withcreateClientOnly
Because we'd bundle
ClientOnly
even if we're going to a page that is not client only otherwiseThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Daniel also suggested that π . It did work, but the main problem was that the Vue showed warnings with page transitions enabled. Client only component isn't working well under transitions :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, maybe can we wrap with a div so vue can correctly apply transitions ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried doing that and now even just wrapping page component into
createClientOnly
seems not working πThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently testing island pages by defining it within the
route.mjs
with a dynamic import and a.then
. I'm pretty sure we can do the same thing forcreateClientOnly