Compare commits

...

297 Commits

Author SHA1 Message Date
Michael Brevard 51472e20fb
Merge f054daccf8 into 52faf52cde 2024-09-19 20:08:13 +03:00
renovate[bot] 52faf52cde
chore(deps): update lycheeverse/lychee-action digest to 5047c2a (main) (#29079)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-19 16:35:38 +01:00
renovate[bot] 67c01c4b80
chore(deps): update actions/setup-node action to v4.0.4 (main) (#29080)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-19 16:35:29 +01:00
Damian Głowala 58ae53b402
feat(nuxt,schema): allow setting serialisable vue app config (#28873) 2024-09-19 14:59:50 +01:00
renovate[bot] c5cfe106cc
chore(deps): update devdependency changelogen to v0.5.7 (main) (#29074)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-19 14:47:11 +01:00
renovate[bot] 95e00dd7ee
chore(deps): update dependency jiti to v2.0.0-rc.1 (main) (#29070)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-19 13:47:16 +01:00
Sébastien Chopin effb57d3a3
docs: remove duotone icons for clarity (#29040) 2024-09-19 13:20:16 +01:00
Daniel Roe f6ecf9a202
fix(nuxt): don't resolve relative import type paths for deps (#29069) 2024-09-19 13:18:28 +01:00
Daniel Roe b67f13cd6b
fix(nuxt): empty nitro `buildDir` in dev mode (#29068) 2024-09-19 13:11:30 +01:00
renovate[bot] 5466ac4711
chore(deps): update all non-major dependencies (main) (#29061)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-19 13:11:21 +01:00
tbitw2549 f054daccf8 docs: add conditional rendering and state caveats 2024-09-15 12:59:54 +03:00
tbitw2549 cd7cc48ca3 Merge branch 'patch-21' of https://github.com/GalacticHypernova/nuxt into patch-21 2024-09-15 09:20:11 +03:00
tbitw2549 59392c7f7e chore: remove ts-expect-error 2024-09-15 09:20:06 +03:00
Michael Brevard 100664e149
docs: typo 2024-09-15 07:53:32 +03:00
Michael Brevard 6945776b6c
docs: rephrase lazy time misuse case 2024-09-15 07:52:34 +03:00
Michael Brevard 6c741f7cad
Merge branch 'main' into patch-21 2024-09-15 07:44:08 +03:00
Michael Brevard 0bed244f5c
docs: reference pure conditional hydration as a LazyIf option 2024-09-15 07:03:24 +03:00
Michael Brevard bf131a2173
docs: hydration event callback example 2024-09-14 21:54:02 +03:00
tbitw2549 c0844b902e feat: add hydration emit for callbacks 2024-09-14 21:31:16 +03:00
tbitw2549 373e223268 fix: merge attrs at render
This fixes a reactivity issue and adds an accompanying test case
2024-09-14 20:43:23 +03:00
tbitw2549 70b7739739 fix: remove ref 2024-09-14 18:47:19 +03:00
tbitw2549 c39bad01e2 refactor: use props in stead of attrs 2024-09-14 18:44:25 +03:00
Michael Brevard 1ad62a16f5
docs: add custom strategies example via LazyIf 2024-09-14 16:57:14 +03:00
Michael Brevard 6f1757700c
docs: rephrase caveats and best practices 2024-09-14 16:40:56 +03:00
tbitw2549 fe9b2b96f5 feat: time and promise based delayed hydration 2024-09-14 14:01:50 +03:00
Michael Brevard 86384794e8
Merge branch 'main' into patch-21 2024-09-14 09:11:54 +03:00
Michael Brevard 3ced1449e6
chore: remove space 2024-09-13 15:04:38 +03:00
Michael Brevard 1429c11394
Merge branch 'main' into patch-21 2024-09-13 14:09:03 +03:00
Michael Brevard 2d2074a927
chore(test): rerun tests 2024-09-13 13:30:56 +03:00
Michael Brevard e068873e6e
test: add grace period for intersection observer 2024-09-13 13:01:03 +03:00
Michael Brevard 4e469b7de5
test: adjust test 2024-09-13 12:36:52 +03:00
tbitw2549 87cd1048ca Merge branch 'patch-21' of https://github.com/GalacticHypernova/nuxt into patch-21 2024-09-13 12:22:02 +03:00
tbitw2549 311ac8ad93 fix: return imports 2024-09-13 12:21:36 +03:00
Michael Brevard 5cc422b820
Merge branch 'main' into patch-21 2024-09-13 12:11:14 +03:00
tbitw2549 8b95e4e05a chore: fix media post conflict 2024-09-13 12:07:47 +03:00
tbitw2549 a9c76a405c Merge branch 'patch-21' of https://github.com/GalacticHypernova/nuxt into patch-21 2024-09-13 12:07:09 +03:00
tbitw2549 fb6d4a518a refactor: avoid conflicting renders
This refactors SSR handling with the existing approach, given the SSR limitation of establishing rendering separation.

This also simplifies SSR renders using the same data and adds early returns wherever possible to internally minimize delayed hydration dependency
2024-09-13 12:04:49 +03:00
Daniel Roe c32834fc2e
chore: type 2024-09-11 21:09:33 +01:00
Daniel Roe 07c7f2ca92
chore: lint 2024-09-11 21:07:25 +01:00
Daniel Roe 889a5642fb
Merge remote-tracking branch 'origin/main' into patch-21 2024-09-11 21:06:10 +01:00
tbitw2549 74231878ea chore: update components with documentation 2024-08-30 00:04:39 +03:00
tbitw2549 67d3cadcb2 wip: fix never hydrated, prepare tests 2024-08-29 11:58:48 +03:00
tbitw2549 124d1e2b49 test: immediately-available visible elem 2024-08-28 16:26:59 +03:00
tbitw2549 5e973777b7 refactor: avoid function chain 2024-08-28 16:26:35 +03:00
tbitw2549 f0c492a657 fix: default empty media query, add new templates 2024-08-25 14:03:00 +03:00
tbitw2549 e304d6c367 feat: support condition, media query, and never
This adds 3 more types of hydration to cover most of the use cases.
2024-08-25 13:53:29 +03:00
Michael Brevard 7fc29e1a56
test: refactor test without responses 2024-08-20 15:19:36 +03:00
Michael Brevard 1794ae33f1
test: begin waiting for response before events 2024-08-20 14:51:44 +03:00
autofix-ci[bot] 62fb11f253
[autofix.ci] apply automated fixes 2024-08-20 11:19:22 +00:00
Daniel Roe 31779d2371
Merge remote-tracking branch 'origin/main' into patch-21 2024-08-20 12:12:14 +01:00
Michael Brevard 309726060c
docs: fix createIdleLoader usage example 2024-08-20 14:03:00 +03:00
Michael Brevard 1a1fe463df
chore: remove commented out import 2024-08-20 13:54:31 +03:00
tbitw2549 60a34552cc style: refactor to reusable function 2024-08-16 23:51:42 +03:00
tbitw2549 47e2443a37 refactor: reuse the generated dynamic import 2024-08-16 18:50:45 +03:00
tbitw2549 784c34fc91 chore: revert export of useObserver 2024-08-16 18:14:14 +03:00
tbitw2549 f3f594f7f9 chore: rebase to vue 3.5 branch
rebases to #28285
2024-08-16 17:54:41 +03:00
Michael Brevard 3426fca610
Merge branch 'main' into patch-21 2024-08-13 23:13:16 +03:00
tbitw2549 b64dca110e refactor: use vue native hydration strategies 2024-08-13 19:18:03 +03:00
tbitw2549 cafc328ef2 fix: specify correct versions for non-changed deps 2024-08-13 18:37:24 +03:00
Michael Brevard 8d066205c2
Merge branch 'main' into patch-21 2024-08-13 18:22:59 +03:00
Michael Brevard b9b25a6e41
Merge branch 'main' into patch-21 2024-08-05 20:29:29 +03:00
Michael Brevard 2df3351048
Merge branch 'main' into patch-21 2024-07-12 14:01:28 +03:00
Michael Brevard 52789fa47a
fix: revert to map 2024-06-29 12:39:25 +03:00
Michael Brevard 3d88fce4c7
chore: use a WeakMap 2024-06-29 09:31:21 +03:00
Michael Brevard 0e4e92b716
test: try through hydration 2024-06-28 16:32:05 +03:00
Michael Brevard 6803f61667
chore: debug timeout tests 2024-06-28 16:05:00 +03:00
Michael Brevard 9060907f3f
chore: no async 2024-06-28 13:46:54 +03:00
Michael Brevard b28ee7896d
test: refactor custom component test 2024-06-28 13:39:00 +03:00
Michael Brevard e7621cb222
chore: attempt to close the page 2024-06-27 20:32:02 +03:00
Michael Brevard 97fd06e4ff
Merge branch 'main' into patch-21 2024-06-27 17:40:56 +03:00
tbitw2549 70789a0631 chore: rename loader to hydrate 2024-06-22 00:20:01 +03:00
autofix-ci[bot] 9456f3f12e
[autofix.ci] apply automated fixes 2024-06-21 15:15:04 +00:00
Michael Brevard a80843f9d2
Merge branch 'main' into patch-21 2024-06-21 18:12:51 +03:00
Michael Brevard 9cbdbc7814
chore: better wording 2024-06-20 09:47:25 +03:00
Michael Brevard d80c5562b7
docs: provide clearer separation between Lazy and DH 2024-06-20 09:45:13 +03:00
Michael Brevard f47b0d6c4e
chore: rename variable 2024-06-20 09:37:55 +03:00
Michael Brevard 0919a82a75
Merge branch 'main' into patch-21 2024-06-19 16:28:41 +03:00
Michael Brevard 5cb4e41553
docs: rephrase 2024-06-19 12:08:39 +03:00
Michael Brevard 0046959bf3
chore: remove createVNode import 2024-06-18 12:49:22 +03:00
Michael Brevard 0f79d798e9
perf: avoid wrapping client vnode in dynamic vnode 2024-06-18 12:45:23 +03:00
Michael Brevard b36d0b484e
docs: fix space and link 2024-06-18 00:24:15 +03:00
Michael Brevard bfb875e1fe
docs: remove warning, add modifier conflicting component info 2024-06-18 00:22:48 +03:00
Michael Brevard 66c831bd41
test: add fake delayed hydration comp 2024-06-17 23:45:53 +03:00
Michael Brevard 8344e87dc8
fix: use correct extension 2024-06-17 23:45:00 +03:00
Michael Brevard 0585f8aba0
Create EventView.server.vue 2024-06-17 23:44:30 +03:00
Michael Brevard b21f88e5da
Create EventView.client.ts 2024-06-17 23:43:30 +03:00
Michael Brevard 24fdcda7d4
test: add component name modifier conflict test 2024-06-17 23:40:30 +03:00
Michael Brevard 51f20645d9
fix: allow for components to begin with the names of modifiers 2024-06-17 23:00:16 +03:00
Michael Brevard cd7e85842c
Merge branch 'main' into patch-21 2024-06-17 17:20:13 +03:00
Michael Brevard 38fabb56e6
docs: update component prefix for visible 2024-06-17 17:19:35 +03:00
Michael Brevard 7025412d35
docs: update component prefix for event 2024-06-17 17:19:20 +03:00
Michael Brevard 022b836cdc
docs: update experimental config key 2024-06-17 17:18:49 +03:00
Michael Brevard b749509f9d
Merge branch 'main' into patch-21 2024-06-16 23:20:42 +03:00
Michael Brevard d54e58dc44
test: add default override test 2024-06-16 19:51:37 +03:00
Michael Brevard 794f46114f
chore: retry tests 2024-06-16 17:09:49 +03:00
Michael Brevard 5124ebe4d1
tests: use new delayedHydration key 2024-06-16 17:05:40 +03:00
Michael Brevard 768ebe4591
chore: delayed component cleanup 2024-06-16 16:50:35 +03:00
Michael Brevard 3f11337999
chore: loader cleanup 2024-06-16 16:49:43 +03:00
Michael Brevard 36ffef9fa5
fix: use lowercase boolean 2024-06-16 16:48:40 +03:00
Michael Brevard e2416801e4
chore: schema cleanup 2024-06-16 16:48:06 +03:00
Michael Brevard 7f51c8a133
feat: add intellisense for loaders 2024-06-16 16:11:58 +03:00
Michael Brevard 6cb16f41cf
feat: add delayed-hydration components to template 2024-06-16 12:53:14 +03:00
Michael Brevard ee6cd61e2d
Merge branch 'main' into patch-21 2024-06-16 12:23:21 +03:00
Michael Brevard 1fbe165da5
chore: begin response logging before click 2024-06-16 11:11:09 +03:00
Michael Brevard 7bdfc6cc86
fix: use custom loader element 2024-06-16 10:43:05 +03:00
Michael Brevard 86e88052fc
fix: update test 2024-06-16 10:20:51 +03:00
autofix-ci[bot] 34d13cbe0e
[autofix.ci] apply automated fixes 2024-06-16 07:11:03 +00:00
Michael Brevard 945a225d78
fix: autofix 2024-06-16 10:08:36 +03:00
Michael Brevard b72e45ef9e
fix: parentheses 2024-06-16 10:04:51 +03:00
Michael Brevard 751e5f8194
tests: add tests for delayed hydration triggers 2024-06-16 10:02:27 +03:00
Michael Brevard f8f752fc74
chore: prepare tests for custom trigger delayed hydration 2024-06-16 09:56:11 +03:00
Michael Brevard 587a5dbce0
Merge branch 'main' into patch-21 2024-06-15 17:51:59 +03:00
Michael Brevard 3727a435b5
fix: avoid setting another mounted if instance is registered 2024-06-15 17:04:19 +03:00
autofix-ci[bot] 5d5432cba7
[autofix.ci] apply automated fixes 2024-06-15 13:38:28 +00:00
Michael Brevard aa3df0bc6f
chore: autofix 2024-06-15 16:35:57 +03:00
Michael Brevard b8c36774f5
tests: refactor tests to use waitForResponse 2024-06-15 16:32:09 +03:00
Michael Brevard 76a267de4d
chore: attempt hard coded await for event 2024-06-15 14:18:46 +03:00
autofix-ci[bot] cf9a905993
[autofix.ci] apply automated fixes 2024-06-15 05:53:03 +00:00
Michael Brevard 0ab38fcd09
Merge branch 'main' into patch-21 2024-06-15 08:50:42 +03:00
Michael Brevard e12d4b13ee
fix: assert bounding box is not null 2024-06-15 08:25:03 +03:00
Michael Brevard 5390cae241
fix: await bounding vox 2024-06-15 01:26:02 +03:00
Michael Brevard d5bd5f8392
types: add stricter types 2024-06-15 01:24:36 +03:00
tbitw2549 76f2f5dc4a docs: add reference to event-based lazy loading 2024-06-15 01:10:20 +03:00
tbitw2549 06096dcc0c feat: add event-based lazy loading 2024-06-15 01:06:47 +03:00
Michael Brevard e3a0242048
chore: delete unused delayed hydration server plugin 2024-06-15 00:00:51 +03:00
tbitw2549 9ba1682eba fix: add space 2024-06-14 23:32:13 +03:00
tbitw2549 0c8672bc62 Merge branch 'patch-21' of https://github.com/GalacticHypernova/nuxt into patch-21 2024-06-14 23:27:41 +03:00
tbitw2549 1cb243ed08 feat: auto-import loaders and update docs 2024-06-14 23:27:22 +03:00
autofix-ci[bot] d556ac26f7
[autofix.ci] apply automated fixes 2024-06-14 19:45:02 +00:00
tbitw2549 4a1c1f5969 wip: add hardcoded await 2024-06-14 22:42:26 +03:00
tbitw2549 fa0bdc0e5b chore: revert for code style 2024-06-14 20:23:40 +03:00
tbitw2549 068d40a283 chore: attempt to provide default non-null value 2024-06-14 20:17:09 +03:00
tbitw2549 52e55ee044 Merge branch 'patch-21' of https://github.com/GalacticHypernova/nuxt into patch-21 2024-06-14 19:55:33 +03:00
tbitw2549 64179576b5 fix: provide strict typing for intersection 2024-06-14 19:55:14 +03:00
autofix-ci[bot] 85c1ac8266
[autofix.ci] apply automated fixes 2024-06-14 16:51:55 +00:00
tbitw2549 1c883b983e chore: return since annotation 2024-06-14 19:46:41 +03:00
tbitw2549 d6e475ec0d Merge branch 'patch-21' of https://github.com/GalacticHypernova/nuxt into patch-21 2024-06-14 19:45:38 +03:00
tbitw2549 9cec31ea49 chore: provide default options 2024-06-14 19:44:13 +03:00
autofix-ci[bot] d520d347f2
[autofix.ci] apply automated fixes 2024-06-14 16:24:13 +00:00
tbitw2549 dbdb3fe6a1 fix: remove unused type import 2024-06-14 19:21:26 +03:00
tbitw2549 712f81390d chore: refactor for consistency 2024-06-14 19:17:22 +03:00
tbitw2549 3602fe1947 Merge branch 'patch-21' of https://github.com/GalacticHypernova/nuxt into patch-21 2024-06-14 18:49:18 +03:00
tbitw2549 2021eac17b fix: wait for nuxt to be ready 2024-06-14 18:48:57 +03:00
autofix-ci[bot] c2e22c60e9
[autofix.ci] apply automated fixes 2024-06-14 15:41:51 +00:00
Michael Brevard 0ead860117
Merge branch 'main' into patch-21 2024-06-14 18:39:18 +03:00
tbitw2549 8c522836ed wip: review work 2024-06-14 18:31:21 +03:00
Michael Brevard 23d0b8e4c8
feat: add delayed-hydration loaders for fine-grained control 2024-06-14 16:06:54 +03:00
Michael Brevard c14580d8c1
chore: remove div in server render 2024-06-13 01:47:45 +03:00
Michael Brevard 0b769781c5
chore: remove comment and unnecessary divs 2024-06-13 01:11:17 +03:00
Michael Brevard da1db599cc
Merge branch 'main' into patch-21 2024-06-12 18:33:39 +03:00
Michael Brevard 0732872d74
Merge branch 'main' into patch-21 2024-06-12 14:08:25 +03:00
Michael Brevard 6e6832fc3e
Merge branch 'main' into patch-21 2024-06-11 19:20:31 +03:00
Michael Brevard 09489b9d7a
Merge branch 'main' into patch-21 2024-06-10 13:21:45 +03:00
Michael Brevard 10e9d00fa4
fix: assume network has already fetches 2024-06-10 11:57:14 +03:00
Michael Brevard 6be28279f1
docs: fix case 2024-06-10 11:56:41 +03:00
Michael Brevard 0792f95b86
chore: retry network evaluation 2024-06-10 11:41:33 +03:00
Michael Brevard fb3397701e
chore: revert test 2024-06-10 11:24:16 +03:00
Michael Brevard 2fd3aa422f
Merge branch 'main' into patch-21 2024-06-10 11:01:55 +03:00
Michael Brevard 09f341c3ef
chore: revert test page 2024-06-10 10:41:49 +03:00
Michael Brevard 2089f745a8
test: refactor test 2024-06-10 10:29:32 +03:00
Michael Brevard 7ad6b06809
chore: retry tests 2024-06-10 00:45:03 +03:00
Michael Brevard 1039735d45
chore: await another networkidle 2024-06-10 00:41:55 +03:00
Michael Brevard 2b765e0b88
chore: refactor the test 2024-06-10 00:30:13 +03:00
Michael Brevard 53c8bb92fe
chore: attempt to check through html 2024-06-10 00:20:49 +03:00
Michael Brevard ed16dc4a7d
chore: extract import 2024-06-09 23:45:22 +03:00
Michael Brevard b0f4f64d27
chore: retry without promise.all 2024-06-09 23:43:41 +03:00
Michael Brevard c8cbcfc56e
chore: use Promise.all to try and be faster than initial idle time 2024-06-09 23:36:04 +03:00
Michael Brevard 53d73baa48
test: attempt network idle test 2024-06-09 23:34:04 +03:00
autofix-ci[bot] 79a805fa8c
[autofix.ci] apply automated fixes 2024-06-09 20:08:02 +00:00
Michael Brevard b9e7354241
chore: fix network comp display 2024-06-09 23:05:34 +03:00
Michael Brevard ee7d8fa20e
fix: evaluate scroll after initial check 2024-06-09 22:25:06 +03:00
Michael Brevard b87a70c825
chore: attempt a higher div 2024-06-09 21:07:39 +03:00
Michael Brevard 86e7c44ca5
Merge branch 'main' into patch-21 2024-06-09 18:56:50 +03:00
Michael Brevard 4442d5f294
Merge branch 'main' into patch-21 2024-06-08 17:15:54 +03:00
Michael Brevard a80536d4c0
Merge branch 'main' into patch-21 2024-06-07 23:26:45 +03:00
Michael Brevard 6fa4dd2807
Merge branch 'main' into patch-21 2024-06-07 19:47:33 +03:00
Michael Brevard 6e4f05d31d
Merge branch 'main' into patch-21 2024-06-07 17:53:24 +03:00
Michael Brevard 7137a7b3b5
Merge branch 'main' into patch-21 2024-06-07 16:08:20 +03:00
Michael Brevard afa2e9aedf
Merge branch 'main' into patch-21 2024-06-04 12:21:01 +03:00
autofix-ci[bot] 4eb39d1062
[autofix.ci] apply automated fixes 2024-06-03 07:41:35 +00:00
Michael Brevard b764ae93be
fix: add componentLazyHydration 2024-06-03 10:39:14 +03:00
Michael Brevard 2f2cb8e0cf
fix: only enable delayed hydration with the experimental flag 2024-06-03 10:22:52 +03:00
autofix-ci[bot] e0a2f219db
[autofix.ci] apply automated fixes 2024-06-03 06:36:24 +00:00
Michael Brevard a53c5897a1
docs: add docs for delayed hydration 2024-06-03 09:35:49 +03:00
Michael Brevard ea0dea2a49
chore: rerun tests 2024-06-03 00:59:53 +03:00
Michael Brevard 440f4cc91a
chore: temporarily remove network component 2024-06-03 00:55:28 +03:00
autofix-ci[bot] a0f43b45f2
[autofix.ci] apply automated fixes 2024-06-02 21:41:22 +00:00
Michael Brevard 502383feea
chore: attempt to remove the pre-idle checks 2024-06-03 00:38:58 +03:00
Michael Brevard 046c1ce85f
chore: attempt to redo component 2024-06-03 00:27:40 +03:00
Michael Brevard 9746137b28
test: add network idle test 2024-06-03 00:04:43 +03:00
Michael Brevard f4f8ca08dc
chore: add network idle component 2024-06-03 00:02:31 +03:00
Michael Brevard d32cfdf09b
Create DelayedNetwork.server.vue 2024-06-03 00:01:15 +03:00
Michael Brevard a26603fafb
Create DelayedNetwork.client.vue 2024-06-03 00:00:54 +03:00
Michael Brevard 90fb0d5904
Update and rename DelayedHydration.server.vue to DelayedVisible.server.vue 2024-06-03 00:00:08 +03:00
Michael Brevard 6d3ec1714b
Update and rename DelayedHydration.client.vue to DelayedVisible.client.vue 2024-06-02 23:59:43 +03:00
Michael Brevard 5051c861b1
chore: remove VNode type 2024-06-02 23:49:48 +03:00
Michael Brevard 2a244f056f
chore: remove unused vnode 2024-06-02 23:43:29 +03:00
Michael Brevard 66dd659821
fix: delayed hydration for network idle 2024-06-02 23:40:37 +03:00
Michael Brevard 28647ecb30
chore: attempt to wait for network idle 2024-06-02 23:24:40 +03:00
Michael Brevard 41c4b53af7
chore: use new component 2024-06-02 22:33:25 +03:00
Michael Brevard d04d244799
fix: remove line 2024-06-02 22:04:03 +03:00
Michael Brevard b1c498bea7
test: named LazyVisible components 2024-06-02 21:56:49 +03:00
Michael Brevard b143038cef
fix: change name 2024-06-02 21:55:58 +03:00
Michael Brevard 6f806878fd
Create DelayedHydration.server.vue 2024-06-02 21:51:33 +03:00
Michael Brevard f5937803f8
chore: rename component 2024-06-02 21:51:05 +03:00
autofix-ci[bot] 2ac90f37b6
[autofix.ci] apply automated fixes 2024-06-02 14:20:58 +00:00
Michael Brevard 4616c172e0
fix: remove leftover previous code 2024-06-02 17:18:40 +03:00
Michael Brevard b1e66e5c05
fix: return component when server-side 2024-06-02 17:13:03 +03:00
Michael Brevard fa46fe3e4f
feat: refactor regex, add network idle 2024-06-02 17:12:01 +03:00
autofix-ci[bot] 3076e02082
[autofix.ci] apply automated fixes 2024-06-02 06:47:41 +00:00
Michael Brevard d65d3174b8
Merge branch 'main' into patch-21 2024-06-02 09:45:17 +03:00
Michael Brevard ad6bef5f70
Merge branch 'main' into patch-21 2024-05-03 12:13:44 +03:00
autofix-ci[bot] b45c3c9cae
[autofix.ci] apply automated fixes 2024-04-14 11:06:56 +00:00
Michael Brevard 850287bf18
fix: remove the preload for SSR render of delayed hydration 2024-04-14 14:04:45 +03:00
Michael Brevard 0cb15c6bbd
chore: remove wait for load state 2024-04-14 12:53:49 +03:00
autofix-ci[bot] 8eaf057ffe
[autofix.ci] apply automated fixes 2024-04-13 19:41:39 +00:00
Michael Brevard 9b8d33babf
fix: remove unused var 2024-04-13 22:39:23 +03:00
Michael Brevard 13949edeb3
wip: wait for response with the component 2024-04-13 22:37:03 +03:00
julien huang fd0adea179 fix: return render function and not vnode directly 2024-04-13 20:14:36 +02:00
autofix-ci[bot] 162908aac0
[autofix.ci] apply automated fixes 2024-04-13 16:08:11 +00:00
Michael Brevard 7821e7f441
feat(schema): add experimental lazy hydration option 2024-04-13 19:05:47 +03:00
Michael Brevard 1f196a57cd
Merge branch 'main' into patch-21 2024-04-13 17:26:46 +03:00
autofix-ci[bot] 5c300a4698
[autofix.ci] apply automated fixes 2024-04-13 10:38:41 +00:00
Julien Huang e4c9940269 fix: ssr improvement + static vnode rendering 2024-04-13 11:06:09 +02:00
Michael Brevard cfb6660fcd
fix: missing question marks 2024-04-11 00:42:29 +03:00
Michael Brevard cb7fc3f873
chore: rerunning tests 2024-04-11 00:33:42 +03:00
Michael Brevard 8555cec97d
fix: ensure el itself isn't null 2024-04-11 00:20:34 +03:00
Michael Brevard 2ee3cf53ee
fix: verify none null 2024-04-11 00:16:39 +03:00
Michael Brevard dc6d922773
fix: join the fragments 2024-04-11 00:13:22 +03:00
Michael Brevard e2d0350698
fix: use VNode type 2024-04-11 00:10:54 +03:00
Michael Brevard 580d9bd463
fix: import useNuxtApp and provide types 2024-04-11 00:06:49 +03:00
autofix-ci[bot] 31002ecc2d
[autofix.ci] apply automated fixes 2024-04-10 21:05:11 +00:00
Michael Brevard 2375650c36
feat: support lazy hydration on SSR 2024-04-11 00:02:48 +03:00
Michael Brevard b4c4d47721
Merge branch 'main' into patch-21 2024-04-10 10:43:21 +03:00
Michael Brevard effebbb02f
fix: strict types 2024-04-10 10:32:26 +03:00
Michael Brevard 2df20ac681
fix: remove comma 2024-04-10 10:02:39 +03:00
Michael Brevard 503b560d9b
wip: network idle based delayed component 2024-04-10 10:00:38 +03:00
Michael Brevard 817c3ace86
Merge branch 'nuxt:patch-21' into patch-21 2024-04-10 00:15:50 +03:00
julien huang 382bc93efe test: remove only 2024-04-09 23:14:44 +02:00
Michael Brevard 717a91c10a
Merge branch 'nuxt:patch-21' into patch-21 2024-04-10 00:11:00 +03:00
julien huang 45e49c5beb test: wait for network idle 2024-04-09 23:10:31 +02:00
Michael Brevard 8c1c23a422
chore: trying to resolve default 2024-04-09 23:47:41 +03:00
julien huang b3250e4a46 fix(nuxt): send the component loader and not the name 2024-04-09 21:55:27 +02:00
Michael Brevard d4bca6cd57
refactor: use page.evaluate 2024-04-09 22:24:48 +03:00
Michael Brevard 59edd16fce
chore: mark no side effects 2024-04-09 22:12:57 +03:00
Michael Brevard 3a8b1f3b75
chore: rerunning tests 2024-04-09 22:04:39 +03:00
Michael Brevard 9b94d100a2
chore: retrying without ClientOnly 2024-04-09 22:01:37 +03:00
autofix-ci[bot] 669fcee81b
[autofix.ci] apply automated fixes 2024-04-09 18:51:50 +00:00
Michael Brevard 2fa63ccfff
Merge branch 'main' into patch-21 2024-04-09 21:49:35 +03:00
Michael Brevard 988a99b771
fix: don't use the default that is used for slots 2024-04-09 21:49:02 +03:00
autofix-ci[bot] 26f2e4e7d1
[autofix.ci] apply automated fixes 2024-04-08 17:18:37 +00:00
Michael Brevard 5653d9e255
wip: retrying through mouse.wheel 2024-04-08 20:16:18 +03:00
autofix-ci[bot] bd7ca85fb4
[autofix.ci] apply automated fixes 2024-04-08 17:00:52 +00:00
Michael Brevard dd36a18140
wip: add scrolling to test for delayed hydration 2024-04-08 19:58:33 +03:00
Michael Brevard 36dc73152f
fix: append identifier before import 2024-04-08 19:28:58 +03:00
autofix-ci[bot] 2236f78566
[autofix.ci] apply automated fixes 2024-04-08 16:21:16 +00:00
Michael Brevard 4b0d88c54e
refactor: use a component to test transform 2024-04-08 19:18:47 +03:00
Michael Brevard d89e70e065
Create DelayedWrapperTestComponent.vue 2024-04-08 19:18:09 +03:00
Michael Brevard 84b2333cf5
fix: await 2024-04-08 19:09:35 +03:00
Michael Brevard 10f7f22c82
fix: check for count 2024-04-08 19:03:15 +03:00
Michael Brevard 00a68bd7ff
fix: async 2024-04-08 18:56:25 +03:00
Michael Brevard 88bae15ad7
wip: testing page text getting 2024-04-08 18:52:27 +03:00
autofix-ci[bot] d209a02492
[autofix.ci] apply automated fixes 2024-04-08 15:02:03 +00:00
Michael Brevard 4cc9efe563
wip: add initial lazy load check 2024-04-08 17:59:41 +03:00
autofix-ci[bot] 998c1ba551
[autofix.ci] apply automated fixes 2024-04-08 14:39:42 +00:00
Michael Brevard 6c683e0b6e
wip: add comp to lazy-import-components 2024-04-08 17:37:18 +03:00
autofix-ci[bot] 816ba111b4
[autofix.ci] apply automated fixes 2024-04-08 14:22:13 +00:00
Michael Brevard 20a32b2200
wip: provide hardcoded check to test delayed hydration runtime comp 2024-04-08 17:19:59 +03:00
autofix-ci[bot] 66938bc152
[autofix.ci] apply automated fixes 2024-04-08 07:24:28 +00:00
Michael Brevard 758824463d
Merge branch 'main' into patch-21 2024-04-08 10:21:48 +03:00
Michael Brevard 444e5be6e8
Merge branch 'main' into patch-21 2024-04-05 12:36:56 +03:00
Michael Brevard 8d435a1f45
Merge branch 'main' into patch-21 2024-04-02 12:12:41 +03:00
Michael Brevard 9713e32f07
Merge branch 'nuxt:main' into patch-21 2024-03-31 18:06:22 +03:00
Michael Brevard 586cfa5a3e
Merge branch 'main' into patch-21 2024-03-30 16:12:02 +03:00
Michael Brevard 36f2c75290
Merge branch 'main' into patch-21 2024-03-27 13:47:31 +02:00
Michael Brevard 600f55d2a3
wip: rename client-io-component.ts to client-delayed-component.ts for future wrappers 2024-03-26 16:20:49 +02:00
Michael Brevard 0caf8153ea
Merge branch 'main' into patch-21 2024-03-26 16:19:44 +02:00
autofix-ci[bot] 1e16b4a088
[autofix.ci] apply automated fixes 2024-03-25 17:23:25 +00:00
Michael Brevard f6ba2255e6
fix: ensure observer is not undefined 2024-03-25 19:21:01 +02:00
Michael Brevard 966c17be72
fix: provide a proper wrapper for IO with the comp 2024-03-25 19:19:35 +02:00
Michael Brevard caf73523c8
Merge branch 'main' into patch-21 2024-03-25 15:29:18 +02:00
autofix-ci[bot] b3b1676202
[autofix.ci] apply automated fixes 2024-03-25 13:17:29 +00:00
Michael Brevard f51c9362ce
fix: export function as opposed to type 2024-03-25 15:15:11 +02:00
Michael Brevard 7d2f345511
fix: remove unnecessary imports 2024-03-25 15:12:09 +02:00
Michael Brevard f039dfd09f
feat: provide exported function 2024-03-25 15:07:52 +02:00
Michael Brevard 624188a7cf
feat: extract useObserver 2024-03-25 15:06:53 +02:00
autofix-ci[bot] 85b4d6932b
[autofix.ci] apply automated fixes 2024-03-24 21:17:18 +00:00
Michael Brevard d94436b9c4
fix: import type Ref and provide emit 2024-03-24 23:15:02 +02:00
Michael Brevard 2ac2a975e0
fix: proper intersection callback type 2024-03-24 23:08:51 +02:00
Michael Brevard cb221ed579
types: client-io-component.ts 2024-03-24 22:24:55 +02:00
autofix-ci[bot] 932d143688
[autofix.ci] apply automated fixes 2024-03-24 17:54:31 +00:00
Michael Brevard 6a32dc1c9e
fix: client-io-component.ts 2024-03-24 19:52:16 +02:00
Michael Brevard ae2bb27ac0
fix: provide ref 2024-03-24 19:46:43 +02:00
Michael Brevard 84b0a71b8c
feat: provide an emit 2024-03-24 19:45:47 +02:00
Michael Brevard 9ac1261662
feat: client-io-component.ts barebones functionality 2024-03-24 19:41:29 +02:00
autofix-ci[bot] d64d78fde8
[autofix.ci] apply automated fixes 2024-03-24 17:36:36 +00:00
Michael Brevard 9f629ad45a
feat: lazy hydration 2024-03-24 19:30:58 +02:00
143 changed files with 1314 additions and 607 deletions

View File

@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
cache: "pnpm"

View File

@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
cache: "pnpm"

View File

@ -31,7 +31,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
cache: "pnpm"

View File

@ -26,7 +26,7 @@ jobs:
with:
fetch-depth: 0
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
cache: "pnpm"

View File

@ -39,7 +39,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
cache: "pnpm"
@ -75,7 +75,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Initialize CodeQL
uses: github/codeql-action/init@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
uses: github/codeql-action/init@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
config: |
paths:
@ -91,7 +91,7 @@ jobs:
queries: +security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
uses: github/codeql-action/analyze@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
category: "/language:javascript-typescript"
@ -109,7 +109,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
cache: "pnpm"
@ -140,7 +140,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
cache: "pnpm"
@ -164,7 +164,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
cache: "pnpm"
@ -215,7 +215,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: ${{ matrix.node }}
cache: "pnpm"
@ -270,7 +270,7 @@ jobs:
with:
fetch-depth: 0
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
cache: "pnpm"
@ -311,7 +311,7 @@ jobs:
with:
fetch-depth: 0
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
cache: "pnpm"

View File

@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Lychee link checker
uses: lycheeverse/lychee-action@64c64dfc7ad14257a2001ef393627d334a516a1f # for v1.8.0
uses: lycheeverse/lychee-action@5047c2a4052946424ce139fe111135f6d7c0fe0b # for v1.8.0
with:
# arguments with file types to check
args: >-

View File

@ -23,7 +23,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
cache: "pnpm"

View File

@ -25,7 +25,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
cache: "pnpm"

View File

@ -54,7 +54,7 @@ jobs:
fetch-depth: 1
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
cache: "pnpm"

View File

@ -23,7 +23,7 @@ jobs:
with:
fetch-depth: 0
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
registry-url: "https://registry.npmjs.org/"

View File

@ -68,7 +68,7 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
uses: github/codeql-action/upload-sarif@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
if: github.repository == 'nuxt/nuxt' && success()
with:
sarif_file: results.sarif

View File

@ -2,7 +2,7 @@
title: Introduction
description: Nuxt's goal is to make web development intuitive and performant with a great Developer Experience in mind.
navigation:
icon: i-ph-info-duotone
icon: i-ph-info
---
Nuxt is a free and [open-source framework](https://github.com/nuxt/nuxt) with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with [Vue.js](https://vuejs.org).

View File

@ -1,7 +1,7 @@
---
title: 'Deployment'
description: Learn how to deploy your Nuxt application to any hosting provider.
navigation.icon: i-ph-cloud-duotone
navigation.icon: i-ph-cloud
---
A Nuxt application can be deployed on a Node.js server, pre-rendered for static hosting, or deployed to serverless or edge (CDN) environments.

View File

@ -1,7 +1,7 @@
---
title: Testing
description: How to test your Nuxt application.
navigation.icon: i-ph-check-circle-duotone
navigation.icon: i-ph-check-circle
---
::tip
@ -10,7 +10,7 @@ If you are a module author, you can find more specific information in the [Modul
Nuxt offers first-class support for end-to-end and unit testing of your Nuxt application via `@nuxt/test-utils`, a library of test utilities and configuration that currently powers the [tests we use on Nuxt itself](https://github.com/nuxt/nuxt/tree/main/test) and tests throughout the module ecosystem.
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=yGzwk9xi9gU" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=yGzwk9xi9gU" target="_blank"}
Watch a video from Alexander Lichter about getting started with the `@nuxt/test-utils`.
::

View File

@ -1,7 +1,7 @@
---
title: Upgrade Guide
description: 'Learn how to upgrade to the latest Nuxt version.'
navigation.icon: i-ph-arrow-circle-up-duotone
navigation.icon: i-ph-arrow-circle-up
---
@ -47,7 +47,7 @@ Nuxt 4 is planned to be released **on or before June 14** (though obviously this
Until then, it is possible to test many of Nuxt 4's breaking changes from Nuxt version 3.12+.
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=r4wFKlcJK6c" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=r4wFKlcJK6c" target="_blank"}
Watch a video from Alexander Lichter showing how to opt in to Nuxt 4's breaking changes already.
::

View File

@ -1,7 +1,7 @@
---
title: 'Installation'
description: 'Get started with Nuxt quickly with our online starters or start locally with your terminal.'
navigation.icon: i-ph-play-duotone
navigation.icon: i-ph-play
---
## Play Online
@ -94,7 +94,7 @@ bun run dev -o
```
::
::tip{icon="i-ph-check-circle-duotone"}
::tip{icon="i-ph-check-circle"}
Well done! A browser window should automatically open for <http://localhost:3000>.
::

View File

@ -1,7 +1,7 @@
---
title: Configuration
description: Nuxt is configured with sensible defaults to make you productive.
navigation.icon: i-ph-gear-duotone
navigation.icon: i-ph-gear
---
@ -46,7 +46,7 @@ export default defineNuxtConfig({
})
```
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=DFZI2iVCrNc" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=DFZI2iVCrNc" target="_blank"}
Watch a video from Alexander Lichter about the env-aware `nuxt.config.ts`.
::

View File

@ -1,7 +1,7 @@
---
title: 'Views'
description: 'Nuxt provides several component layers to implement the user interface of your application.'
navigation.icon: i-ph-layout-duotone
navigation.icon: i-ph-layout
---
## `app.vue`

View File

@ -1,7 +1,7 @@
---
title: 'Assets'
description: 'Nuxt offers two options for your assets.'
navigation.icon: i-ph-image-duotone
navigation.icon: i-ph-image
---
Nuxt uses two directories to handle assets like stylesheets, fonts or images.

View File

@ -1,7 +1,7 @@
---
title: 'Styling'
description: 'Learn how to style your Nuxt application.'
navigation.icon: i-ph-palette-duotone
navigation.icon: i-ph-palette
---
Nuxt is highly flexible when it comes to styling. Write your own styles, or reference local and external stylesheets.

View File

@ -1,7 +1,7 @@
---
title: 'Routing'
description: Nuxt file-system routing creates a route for every file in the pages/ directory.
navigation.icon: i-ph-signpost-duotone
navigation.icon: i-ph-signpost
---
One core feature of Nuxt is the file system router. Every Vue file inside the [`pages/`](/docs/guide/directory-structure/pages) directory creates a corresponding URL (or route) that displays the contents of the file. By using dynamic imports for each page, Nuxt leverages code-splitting to ship the minimum amount of JavaScript for the requested route.

View File

@ -1,7 +1,7 @@
---
title: SEO and Meta
description: Improve your Nuxt app's SEO with powerful head config, composables and components.
navigation.icon: i-ph-file-search-duotone
navigation.icon: i-ph-file-search
---
## Defaults

View File

@ -1,7 +1,7 @@
---
title: 'Transitions'
description: Apply transitions between pages and layouts with Vue or native browser View Transitions.
navigation.icon: i-ph-exclude-square-duotone
navigation.icon: i-ph-exclude-square
---
::note

View File

@ -1,7 +1,7 @@
---
title: 'Data fetching'
description: Nuxt provides composables to handle data fetching within your application.
navigation.icon: i-ph-plugs-connected-duotone
navigation.icon: i-ph-plugs-connected
---
Nuxt comes with two composables and a built-in library to perform data-fetching in browser or server environments: `useFetch`, [`useAsyncData`](/docs/api/composables/use-async-data) and `$fetch`.
@ -54,7 +54,7 @@ const { data: count } = await useFetch('/api/count')
This composable is a wrapper around the [`useAsyncData`](/docs/api/composables/use-async-data) composable and `$fetch` utility.
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=njsGVmcWviY" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=njsGVmcWviY" target="_blank"}
Watch the video from Alexander Lichter to avoid using `useFetch` the wrong way!
::
@ -97,7 +97,7 @@ The `useAsyncData` composable is responsible for wrapping async logic and return
It's developer experience sugar for the most common use case.
::
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=0X-aOpSGabA" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=0X-aOpSGabA" target="_blank"}
Watch a video from Alexander Lichter to dig deeper into the difference between `useFetch` and `useAsyncData`.
::

View File

@ -1,14 +1,14 @@
---
title: 'State Management'
description: Nuxt provides powerful state management libraries and the useState composable to create a reactive and SSR-friendly shared state.
navigation.icon: i-ph-database-duotone
navigation.icon: i-ph-database
---
Nuxt provides the [`useState`](/docs/api/composables/use-state) composable to create a reactive and SSR-friendly shared state across components.
[`useState`](/docs/api/composables/use-state) is an SSR-friendly [`ref`](https://vuejs.org/api/reactivity-core.html#ref) replacement. Its value will be preserved after server-side rendering (during client-side hydration) and shared across all components using a unique key.
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=mv0WcBABcIk" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=mv0WcBABcIk" target="_blank"}
Watch a video from Alexander Lichter about why and when to use `useState()`.
::
@ -27,7 +27,7 @@ Never define `const state = ref()` outside of `<script setup>` or `setup()` func
For example, doing `export myState = ref({})` would result in state shared across requests on the server and can lead to memory leaks.
::
::tip{icon="i-ph-check-circle-duotone"}
::tip{icon="i-ph-check-circle"}
Instead use `const useX = () => useState('x')`
::
@ -212,7 +212,7 @@ const color = useColor() // Same as useState('color')
</template>
```
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=dZSNW07sO-A" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=dZSNW07sO-A" target="_blank"}
Watch a video from Daniel Roe on how to deal with global state and SSR in Nuxt.
::

View File

@ -1,7 +1,7 @@
---
title: 'Error Handling'
description: 'Learn how to catch and handle errors in Nuxt.'
navigation.icon: i-ph-bug-beetle-duotone
navigation.icon: i-ph-bug-beetle
---
Nuxt is a full-stack framework, which means there are several sources of unpreventable user runtime errors that can happen in different contexts:

View File

@ -1,7 +1,7 @@
---
title: 'Server'
description: Build full-stack applications with Nuxt's server framework. You can fetch data from your database or another server, create APIs, or even generate static server-side content like a sitemap or a RSS feed - all from a single codebase.
navigation.icon: i-ph-computer-tower-duotone
navigation.icon: i-ph-computer-tower
---
:read-more{to="/docs/guide/directory-structure/server"}
@ -20,7 +20,7 @@ Using Nitro gives Nuxt superpowers:
Nitro is internally using [h3](https://github.com/unjs/h3), a minimal H(TTP) framework built for high performance and portability.
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=DkvgJa-X31k" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=DkvgJa-X31k" target="_blank"}
Watch a video from Alexander Lichter to understand the responsibilities of Nuxt and Nitro in your application.
::

View File

@ -1,7 +1,7 @@
---
title: 'Layers'
description: Nuxt provides a powerful system that allows you to extend the default files, configs, and much more.
navigation.icon: i-ph-stack-duotone
navigation.icon: i-ph-stack
---
One of the core features of Nuxt is the layers and extending support. You can extend a default Nuxt application to reuse components, utils, and configuration. The layers structure is almost identical to a standard Nuxt application which makes them easy to author and maintain.
@ -53,11 +53,11 @@ Nuxt uses [unjs/c12](https://c12.unjs.io) and [unjs/giget](https://giget.unjs.io
Read more about layers in the **Layer Author Guide**.
::
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=lnFCM7c9f7I" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=lnFCM7c9f7I" target="_blank"}
Watch a video from Learn Vue about Nuxt Layers.
::
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=fr5yo3aVkfA" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=fr5yo3aVkfA" target="_blank"}
Watch a video from Alexander Lichter about Nuxt Layers.
::

View File

@ -1,7 +1,7 @@
---
title: "Prerendering"
description: Nuxt allows pages to be statically rendered at build time to improve certain performance or SEO metrics
navigation.icon: i-ph-code-block-duotone
navigation.icon: i-ph-code-block
---
Nuxt allows for select pages from your application to be rendered at build time. Nuxt will serve the prebuilt pages when requested instead of generating them on the fly.
@ -105,7 +105,7 @@ Read more about Nitro's `routeRules` configuration.
As a shorthand, you can also configure this in a page file using [`defineRouteRules`](/docs/api/utils/define-route-rules).
::read-more{to="/docs/guide/going-further/experimental-features#inlinerouterules" icon="i-ph-star-duotone"}
::read-more{to="/docs/guide/going-further/experimental-features#inlinerouterules" icon="i-ph-star"}
This feature is experimental and in order to use it you must enable the `experimental.inlineRouteRules` option in your `nuxt.config`.
::

View File

@ -1,3 +1,3 @@
title: Get Started
titleTemplate: '%s · Get Started with Nuxt'
icon: i-ph-rocket-launch-duotone
icon: i-ph-rocket-launch

View File

@ -7,16 +7,16 @@ surround: false
---
::card-group{class="sm:grid-cols-1"}
::card{icon="i-ph-medal-duotone" title="Key Concepts" to="/docs/guide/concepts"}
::card{icon="i-ph-medal" title="Key Concepts" to="/docs/guide/concepts"}
Discover the main concepts behind Nuxt, from auto-import, hybrid rendering to its TypeScript support.
::
::card{icon="i-ph-folders-duotone" title="Directory Structure" to="/docs/guide/directory-structure"}
::card{icon="i-ph-folders" title="Directory Structure" to="/docs/guide/directory-structure"}
Learn about Nuxt directory structure and what benefits each directory or file offers.
::
::card{icon="i-ph-star-duotone" title="Going Further" to="/docs/guide/going-further"}
::card{icon="i-ph-star" title="Going Further" to="/docs/guide/going-further"}
Master Nuxt with advanced concepts like experimental features, hooks, modules, and more.
::
::card{icon="i-ph-book-open-duotone" title="Recipes" to="/docs/guide/recipes"}
::card{icon="i-ph-book-open" title="Recipes" to="/docs/guide/recipes"}
Find solutions to common problems and learn how to implement them in your Nuxt project.
::
::

View File

@ -60,7 +60,7 @@ That means that (with very few exceptions) you cannot use them outside a Nuxt pl
If you get an error message like `Nuxt instance is unavailable` then it probably means you are calling a Nuxt composable in the wrong place in the Vue or Nuxt lifecycle.
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=ofuKRZLtOdY" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=ofuKRZLtOdY" target="_blank"}
Watch a video from Alexander Lichter about handling async code in composables and fixing `Nuxt instance is unavailable` in your app.
::
@ -68,7 +68,7 @@ Watch a video from Alexander Lichter about handling async code in composables an
When using a composable that requires the Nuxt context inside a non-SFC component, you need to wrap your component with `defineNuxtComponent` instead of `defineComponent`
::
::read-more{to="/docs/guide/going-further/experimental-features#asynccontext" icon="i-ph-star-duotone"}
::read-more{to="/docs/guide/going-further/experimental-features#asynccontext" icon="i-ph-star"}
Checkout the `asyncContext` experimental feature to use Nuxt composables in async functions.
::
@ -182,6 +182,6 @@ export default defineNuxtConfig({
})
```
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=FT2LQJ2NvVI" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=FT2LQJ2NvVI" target="_blank"}
Watch a video from Alexander Lichter on how to easily set up custom auto imports.
::

View File

@ -61,7 +61,7 @@ This file contains the recommended basic TypeScript configuration for your proje
[Read more about how to extend this configuration](/docs/guide/directory-structure/tsconfig).
::tip{icon="i-ph-video-duotone" to="https://youtu.be/umLI7SlPygY" target="_blank"}
::tip{icon="i-ph-video" to="https://youtu.be/umLI7SlPygY" target="_blank"}
Watch a video from Daniel Roe explaining built-in Nuxt aliases.
::

View File

@ -7,7 +7,7 @@ description: "Nuxt supports ESLint out of the box"
The recommended approach for Nuxt is to enable ESLint support using the [`@nuxt/eslint`](https://eslint.nuxt.com/packages/module) module, that will setup project-aware ESLint configuration for you.
:::callout{icon="i-ph-lightbulb-duotone"}
:::callout{icon="i-ph-lightbulb"}
The module is designed for the [new ESLint flat config format](https://eslint.org/docs/latest/use/configure/configuration-files-new) with is the [default format since ESLint v9](https://eslint.org/blog/2024/04/eslint-v9.0.0-released/).
If you are using the legacy `.eslintrc` config, you will need to [configure manually with `@nuxt/eslint-config`](https://eslint.nuxt.com/packages/config#legacy-config-format). We highly recommend you to migrate over the flat config to be future-proof.

View File

@ -1,3 +1,3 @@
title: Key Concepts
titleTemplate: '%s · Nuxt Concepts'
icon: i-ph-medal-duotone
icon: i-ph-medal

View File

@ -2,7 +2,7 @@
title: ".nuxt"
description: "Nuxt uses the .nuxt/ directory in development to generate your Vue application."
head.title: ".nuxt/"
navigation.icon: i-ph-folder-duotone
navigation.icon: i-ph-folder
---
::important

View File

@ -2,7 +2,7 @@
title: ".output"
description: "Nuxt creates the .output/ directory when building your application for production."
head.title: ".output/"
navigation.icon: i-ph-folder-duotone
navigation.icon: i-ph-folder
---
::important

View File

@ -2,7 +2,7 @@
title: "assets"
description: "The assets/ directory is used to add all the website's assets that the build tool will process."
head.title: "assets/"
navigation.icon: i-ph-folder-duotone
navigation.icon: i-ph-folder
---
The directory usually contains the following types of files:

View File

@ -2,7 +2,7 @@
title: "components"
head.title: "components/"
description: "The components/ directory is where you put all your Vue components."
navigation.icon: i-ph-folder-duotone
navigation.icon: i-ph-folder
---
Nuxt automatically imports any components in this directory (along with components that are registered by any modules you may be using).
@ -119,6 +119,193 @@ const show = ref(false)
</template>
```
## Delayed Hydration
Lazy components are great for controlling the chunk sizes in your app, but they don't enhance runtime performance, as they still load eagerly unless conditionally rendered. In real world applications, some pages may include a lot of content and a lot of components, and most of the time not all of them need to be interactive as soon as the page is loaded. Having them all load eagerly can negatively impact performance and increase bundle size.
In order to optimize the page, you may want to delay the hydration of some components until they're visible, or until the browser is done with more important tasks for example. Delaying the hydration of components will ensure it is only loaded when necessary, which is great for making a good user experience and a performant app. Nuxt has first class support for delayed hydration to help with that, without requiring you to write all the related boilerplate.
In order to use delayed hydration, you first need to enable it in your experimental config in `nuxt.config`
```ts [nuxt.config.{ts,js}]
export default defineNuxtConfig({
experimental: {
delayedHydration: true
}
})
```
Nuxt has reserved component prefixes that will handle this delayed hydration for you, that extend dynamic imports. By prefixing your component with `LazyVisible`, Nuxt will automatically handle your component and delay its hydration until it will be on screen.
```vue [pages/index.vue]
<template>
<div>
<LazyVisibleMyComponent />
</div>
</template>
```
If you need the component to load as soon as possible, but not block the critical rendering path, you can use the `LazyIdle` prefix, which would handle your component's hydration whenever the browser goes idle.
```vue [pages/index.vue]
<template>
<div>
<LazyIdleMyComponent />
</div>
</template>
```
If you would like the component to load after certain events occur, like a click or a mouse over, you can use the `LazyEvent` prefix, which would only trigger the hydration when those events occur.
```vue [pages/index.vue]
<template>
<div>
<LazyEventMyComponent />
</div>
</template>
```
If you would like to load the component when the window matches a media query, you can use the `LazyMedia` prefix:
```vue [pages/index.vue]
<template>
<div>
<LazyMediaMyComponent />
</div>
</template>
```
If you would like to never hydrate a component, use the `LazyNever` prefix:
```vue [pages/index.vue]
<template>
<div>
<LazyNeverMyComponent />
</div>
</template>
```
If you would like to hydrate a component after a certain amount of time, use the `LazyTime` prefix:
```vue [pages/index.vue]
<template>
<div>
<LazyTimeMyComponent />
</div>
</template>
```
If you would like to hydrate a component once a promise is fulfilled, use the `LazyPromise` prefix:
```vue [pages/index.vue]
<template>
<div>
<LazyPromiseMyComponent />
</div>
</template>
```
Nuxt's delayed hydration system is highly flexible, allowing each developer to build upon it and implement their own hydration strategy.
If you have highly specific hydration triggers that aren't covered by the default strategies, or you want to have conditional hydraion, you can use the general purpose `LazyIf` prefix:
```vue [pages/index.vue]
<template>
<div>
<button @click="myFunction">Click me to start the custom hydration strategy</button>
<LazyIfMyComponent :hydrate="myCondition" />
</div>
</template>
<script setup lang="ts">
const myCondition = ref(false)
function myFunction() {
// trigger custom hydration strategy...
myCondition.value = true
}
</script>
```
### Custom hydration triggers
If you would like to override the default hydration triggers when dealing with delayed hydration, like changing the timeout, the options for the intersection observer, or the events to trigger the hydration, you can do so by supplying a `hydrate` prop to your lazy components.
```vue [pages/index.vue]
<template>
<div>
<LazyIdleMyComponent :hydrate="createIdleLoader(3000)" />
<LazyVisibleMyComponent :hydrate="createVisibleLoader({threshold: 0.2})" />
<LazyEventMyComponent :hydrate="createEventLoader(['click','mouseover'])" />
<LazyMediaMyComponent hydrate="(max-width: 500px)" />
<LazyIfMyComponent :hydrate="someCondition" />
<LazyTimeMyComponent :hydrate="3000" />
<LazyPromiseMyComponent :hydrate="promise" />
</div>
</template>
<script setup lang="ts">
const someCondition = ref(true)
const promise = Promise.resolve(42)
</script>
```
::read-more{to="/docs/api/utils/create-idle-loader"}
::
::read-more{to="/docs/api/utils/create-visible-loader"}
::
::read-more{to="/docs/api/utils/create-event-loader"}
::
::read-more{to="https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia"}
Read more about using `LazyMedia` components and the accepted values.
::
::important
If your components begin with a reserved delayed hydration prefix like Visible/Idle/Event, they will not have delayed hydration by default. This is made to ensure you have full control over all your components and prevent breaking dynamic imports for those components.
This also means you would need to explicitly add the prefix to those components for if you'd like for them to have delayed hydration.
For example, if you have a component named `IdleBar` and you'd like it to be delayed based on network idle time, you would need to use it like `<LazyIdleIdleBar>` and not `<LazyIdleBar>` to make it a delayed hydration component. Otherwise, it would be treated as a regular [dynamic import](/docs/guide/directory-structure/components#dynamic-imports)
::
### Listening to hydration events
All delayed hydration components have a `@hydrated` event that is fired whenever they are hydrated. You can listen to this event to trigger some action that depends on the component:
```vue [pages/index.vue]
<template>
<div>
<LazyVisibleMyComponent @hydrated="onHydrate" />
</div>
</template>
<script setup lang="ts">
function onHydrate() {
console.log("Component has been hydrated!")
}
</script>
```
### Caveats and best practices
Delayed hydration has many performance benefits, but in order to gain the most out of it, it's important to use it correctly:
1. Avoid delayed hydration components as much as possible for in-viewport content - delayed hydration is best for content that is not immediately available and requires some interaction to get to. If it is present on screen and is meant to be available for use immediately, using it as a normal component would provide better performance and loading times. Use this feature sparingly to avoid hurting the user experience, as there are only a few cases that warrant delayed hydration for on-screen content.
2. Delayed hydration with conditional rendering - when using `v-if` with delayed hydration components, note that `v-if` takes precedence. That means, the component will be hydrated when the `v-if` is truthy, as that will render exclusively on the client. If you need to render the component only when the condition is true, use a regular async component (`<LazyMyComponent />`) with a `v-if`. If you need it to hydrate when the condition is fulfilled, use a delayed hydration prefix with the `hydrate` prop.
3. Delayed hydration with a shared state - when using multiple components (for example, in a `v-for`) with the same `v-model`, where some components might get hydrated before others (for example, progressively increasing media queries), if one of the components updates the model, note that it will trigger hydration for all components with that same model. That is because Vue's reactivity system triggers an update for all the dependencies that rely on that state, forcing hydration in the process. Props are unaffected by this. Try to avoid multiple components with the same model if that is not an intended side effect.
4. Use each hydration strategy for its intended use case - each hydration strategy has built-in optimizations specifically designed for that strategy's purpose. Using them incorrectly could hurt performance and user experience. Examples include:
- Using `LazyIf` for always/never hydrated components (`:hydrate="true"`/`:hydrate="false"`) - you can use a regular component/`LazyNever` respectively, which would provide better performance for each use case. Keep `LazyIf` for components that could get hydrated, but might not get hydrated immediately.
- Using `LazyTime` as an alternative to `LazyIdle` - while these strategies share similarities, they are meant for different purposes. `LazyTime` is specifically designed to hydrate a component immediately after a certain amount of time has passed. `LazyIdle`, on the other hand, is meant to provide a limit for the browser to handle the hydration whenever it's idle. If you use `LazyTime` for idle-based hydration, the browser might handle the component's hydration while handling other, potentially more important components at the same time. This could slow down the hydration for all components being handled.
- \[ADVANCED\] Using only `LazyIf` to manually implement existing hydration strategies - while an option, using only `LazyIf` in stead of relying on the built-in supported strategies could impact the overall memory consumption and performance.
For example, in stead of handling promises manually and setting a boolean indicator for when the promise was fulfilled, which would then get passed to `LazyIf`, using `LazyPromise` directly would handle it without requiring another ref, reducing the complexity and the amount of work Vue's reactivity system would need to handle and track.
Always remember that while `LazyIf` allows for implementation of custom, highly-tailored hydration strategies, it should mainly be used when either pure conditional hydration is required (for example, hydration of a component when a separate button is clicked), or when no built-in strategy matches your specific use case, due to the internal optimizations each existing hydration strategy has.
## Direct Imports
You can also explicitly import components from `#components` if you want or need to bypass Nuxt's auto-importing functionality.
@ -254,11 +441,11 @@ Server components allow server-rendering individual components within your clien
Server components can either be used on their own or paired with a [client component](#paired-with-a-client-component).
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=u1yyXe86xJM" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=u1yyXe86xJM" target="_blank"}
Watch Learn Vue video about Nuxt Server Components.
::
::tip{icon="i-ph-article-duotone" to="https://roe.dev/blog/nuxt-server-components" target="_blank"}
::tip{icon="i-ph-article" to="https://roe.dev/blog/nuxt-server-components" target="_blank"}
Read Daniel Roe's guide to Nuxt Server Components.
::

View File

@ -2,7 +2,7 @@
title: 'composables'
head.title: 'composables/'
description: Use the composables/ directory to auto-import your Vue composables into your application.
navigation.icon: i-ph-folder-duotone
navigation.icon: i-ph-folder
---
## Usage

View File

@ -2,7 +2,7 @@
title: 'content'
head.title: 'content/'
description: Use the content/ directory to create a file-based CMS for your application.
navigation.icon: i-ph-folder-duotone
navigation.icon: i-ph-folder
---
[Nuxt Content](https://content.nuxt.com) reads the [`content/` directory](/docs/guide/directory-structure/content) in your project and parses `.md`, `.yml`, `.csv` and `.json` files to create a file-based CMS for your application.

View File

@ -2,10 +2,10 @@
title: "layouts"
head.title: "layouts/"
description: "Nuxt provides a layouts framework to extract common UI patterns into reusable layouts."
navigation.icon: i-ph-folder-duotone
navigation.icon: i-ph-folder
---
::tip{icon="i-ph-rocket-launch-duotone" color="gray" }
::tip{icon="i-ph-rocket-launch" color="gray" }
For best performance, components placed in this directory will be automatically loaded via asynchronous import when used.
::

View File

@ -2,7 +2,7 @@
title: "middleware"
description: "Nuxt provides middleware to run code before navigating to a particular route."
head.title: "middleware/"
navigation.icon: i-ph-folder-duotone
navigation.icon: i-ph-folder
---
Nuxt provides a customizable **route middleware** framework you can use throughout your application, ideal for extracting code that you want to run before navigating to a particular route.

View File

@ -2,7 +2,7 @@
title: 'modules'
head.title: 'modules/'
description: Use the modules/ directory to automatically register local modules within your application.
navigation.icon: i-ph-folder-duotone
navigation.icon: i-ph-folder
---
It is a good place to place any local modules you develop while building your application.
@ -61,6 +61,6 @@ modules/
:read-more{to="/docs/guide/going-further/modules"}
::tip{icon="i-ph-video-duotone" to="https://vueschool.io/lessons/creating-your-first-module-from-scratch?friend=nuxt" target="_blank"}
::tip{icon="i-ph-video" to="https://vueschool.io/lessons/creating-your-first-module-from-scratch?friend=nuxt" target="_blank"}
Watch Vue School video about Nuxt private modules.
::

View File

@ -2,7 +2,7 @@
title: "node_modules"
description: "The package manager stores the dependencies of your project in the node_modules/ directory."
head.title: "node_modules/"
navigation.icon: i-ph-folder-duotone
navigation.icon: i-ph-folder
---
The package manager ([`npm`](https://docs.npmjs.com/cli/commands/npm) or [`yarn`](https://yarnpkg.com) or [`pnpm`](https://pnpm.io/cli/install) or [`bun`](https://bun.sh/package-manager)) creates this directory to store the dependencies of your project.

View File

@ -2,7 +2,7 @@
title: "pages"
description: "Nuxt provides file-based routing to create routes within your web application."
head.title: "pages/"
navigation.icon: i-ph-folder-duotone
navigation.icon: i-ph-folder
---
::note

View File

@ -2,7 +2,7 @@
title: "plugins"
description: "Nuxt has a plugins system to use Vue plugins and more at the creation of your Vue application."
head.title: "plugins/"
navigation.icon: i-ph-folder-duotone
navigation.icon: i-ph-folder
---
Nuxt automatically reads the files in the `plugins/` directory and loads them at the creation of the Vue application.
@ -76,7 +76,7 @@ export default defineNuxtPlugin({
})
```
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=2aXZyXB1QGQ" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=2aXZyXB1QGQ" target="_blank"}
Watch a video from Alexander Lichter about the Object Syntax for Nuxt plugins.
::

View File

@ -2,7 +2,7 @@
title: "public"
description: "The public/ directory is used to serve your website's static assets."
head.title: "public/"
navigation.icon: i-ph-folder-duotone
navigation.icon: i-ph-folder
---
Files contained within the `public/` directory are served at the root and are not modified by the build process. This is suitable for files that have to keep their names (e.g. `robots.txt`) _or_ likely won't change (e.g. `favicon.ico`).

View File

@ -2,7 +2,7 @@
title: server
head.title: 'server/'
description: The server/ directory is used to register API and server handlers to your application.
navigation.icon: i-ph-folder-duotone
navigation.icon: i-ph-folder
---
Nuxt automatically scans files inside these directories to register API and server handlers with Hot Module Replacement (HMR) support.

View File

@ -2,7 +2,7 @@
title: 'utils'
head.title: 'utils/'
description: Use the utils/ directory to auto-import your utility functions throughout your application.
navigation.icon: i-ph-folder-duotone
navigation.icon: i-ph-folder
---
The main purpose of the [`utils/` directory](/docs/guide/directory-structure/utils) is to allow a semantic distinction between your Vue composables and other auto-imported utility functions.

View File

@ -2,7 +2,7 @@
title: ".env"
description: "A .env file specifies your build/dev-time environment variables."
head.title: ".env"
navigation.icon: i-ph-file-duotone
navigation.icon: i-ph-file
---
::important

View File

@ -2,7 +2,7 @@
title: ".gitignore"
description: "A .gitignore file specifies intentionally untracked files that git should ignore."
head.title: ".gitignore"
navigation.icon: i-ph-file-duotone
navigation.icon: i-ph-file
---
A `.gitignore` file specifies intentionally untracked files that git should ignore.

View File

@ -2,7 +2,7 @@
title: .nuxtignore
head.title: '.nuxtignore'
description: The .nuxtignore file lets Nuxt ignore files in your projects root directory during the build phase.
navigation.icon: i-ph-file-duotone
navigation.icon: i-ph-file
---
The `.nuxtignore` file tells Nuxt to ignore files in your projects root directory ([`rootDir`](/docs/api/nuxt-config#rootdir)) during the build phase.

View File

@ -2,7 +2,7 @@
title: app.config.ts
head.title: 'app.config.ts'
description: Expose reactive configuration within your application with the App Config file.
navigation.icon: i-ph-file-duotone
navigation.icon: i-ph-file
---
Nuxt provides an `app.config` config file to expose reactive configuration within your application with the ability to update it at runtime within lifecycle or using a nuxt plugin and editing it with HMR (hot-module-replacement).

View File

@ -2,7 +2,7 @@
title: "app.vue"
description: "The app.vue file is the main component of your Nuxt application."
head.title: "app.vue"
navigation.icon: i-ph-file-duotone
navigation.icon: i-ph-file
---
## Minimal Usage

View File

@ -2,7 +2,7 @@
title: "error.vue"
description: "The error.vue file is the error page in your Nuxt application."
head.title: "error.vue"
navigation.icon: i-ph-file-duotone
navigation.icon: i-ph-file
---
During the lifespan of your application, some errors may appear unexpectedly at runtime. In such case, we can use the `error.vue` file to override the default error files and display the error nicely.

View File

@ -2,7 +2,7 @@
title: "nuxt.config.ts"
description: "Nuxt can be easily configured with a single nuxt.config file."
head.title: "nuxt.config.ts"
navigation.icon: i-ph-file-duotone
navigation.icon: i-ph-file
---
The `nuxt.config` file extension can either be `.js`, `.ts` or `.mjs`.

View File

@ -2,7 +2,7 @@
title: package.json
head.title: package.json
description: The package.json file contains all the dependencies and scripts for your application.
navigation.icon: i-ph-file-duotone
navigation.icon: i-ph-file
---
The minimal `package.json` of your Nuxt application should looks like:

View File

@ -2,7 +2,7 @@
title: "tsconfig.json"
description: "Nuxt generates a .nuxt/tsconfig.json file with sensible defaults and your aliases."
head.title: "tsconfig.json"
navigation.icon: i-ph-file-duotone
navigation.icon: i-ph-file
---
Nuxt [automatically generates](/docs/guide/concepts/typescript) a `.nuxt/tsconfig.json` file with the resolved aliases you are using in your Nuxt project, as well as with other sensible defaults.

View File

@ -1,3 +1,3 @@
title: Directory Structure
titleTemplate: '%s · Nuxt Directory Structure'
icon: i-ph-folders-duotone
icon: i-ph-folders

View File

@ -104,11 +104,11 @@ export default defineNuxtConfig({
Matching route rules will be created, based on the page's `path`.
::read-more{to="/docs/api/utils/define-route-rules" icon="i-ph-function-duotone"}
::read-more{to="/docs/api/utils/define-route-rules" icon="i-ph-function"}
Read more in `defineRouteRules` utility.
::
:read-more{to="/docs/guide/concepts/rendering#hybrid-rendering" icon="i-ph-medal-duotone"}
:read-more{to="/docs/guide/concepts/rendering#hybrid-rendering" icon="i-ph-medal"}
## renderJsonPayloads
@ -254,7 +254,7 @@ Out of the box, this will enable typed usage of [`navigateTo`](/docs/api/utils/n
You can even get typed params within a page by using `const route = useRoute('route-name')`.
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=SXk-L19gTZk" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=SXk-L19gTZk" target="_blank"}
Watch a video from Daniel Roe explaining type-safe routing in Nuxt.
::
@ -292,7 +292,7 @@ export default defineNuxtConfig({
})
```
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=1jUupYHVvrU" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=1jUupYHVvrU" target="_blank"}
Watch a video from Alexander Lichter about the experimental `sharedPrerenderData` setting.
::

View File

@ -61,7 +61,7 @@ Setting the default of `runtimeConfig` values to *differently named environment
It is advised to use environment variables that match the structure of your `runtimeConfig` object.
::
::tip{icon="i-ph-video-duotone" to="https://youtu.be/_FYV5WfiWvs" target="_blank"}
::tip{icon="i-ph-video" to="https://youtu.be/_FYV5WfiWvs" target="_blank"}
Watch a video from Alexander Lichter showcasing the top mistake developers make using runtimeConfig.
::

View File

@ -45,7 +45,7 @@ This will create a `my-module` project with all the boilerplate necessary to dev
Learn how to perform basic tasks with the module starter.
::tip{icon="i-ph-video-duotone" to="https://vueschool.io/lessons/navigating-the-official-starter-template?friend=nuxt" target="_blank"}
::tip{icon="i-ph-video" to="https://vueschool.io/lessons/navigating-the-official-starter-template?friend=nuxt" target="_blank"}
Watch Vue School video about Nuxt module starter template.
::
@ -274,7 +274,7 @@ export default defineNuxtModule({
When you need to handle more complex configuration alterations, you should consider using [defu](https://github.com/unjs/defu).
::tip{icon="i-ph-video-duotone" to="https://vueschool.io/lessons/extending-and-altering-nuxt-configuration-and-options?friend=nuxt" target="_blank"}
::tip{icon="i-ph-video" to="https://vueschool.io/lessons/extending-and-altering-nuxt-configuration-and-options?friend=nuxt" target="_blank"}
Watch Vue School video about altering Nuxt configuration.
::
@ -311,7 +311,7 @@ Be careful not to expose any sensitive module configuration on the public runtim
:read-more{to="/docs/guide/going-further/runtime-config"}
::tip{icon="i-ph-video-duotone" to="https://vueschool.io/lessons/passing-and-exposing-module-options?friend=nuxt" target="_blank"}
::tip{icon="i-ph-video" to="https://vueschool.io/lessons/passing-and-exposing-module-options?friend=nuxt" target="_blank"}
Watch Vue School video about passing and exposing Nuxt module options.
::
@ -538,7 +538,7 @@ export default defineNuxtModule({
:read-more{to="/docs/api/advanced/hooks"}
::tip{icon="i-ph-video-duotone" to="https://vueschool.io/lessons/nuxt-lifecycle-hooks?friend=nuxt" target="_blank"}
::tip{icon="i-ph-video" to="https://vueschool.io/lessons/nuxt-lifecycle-hooks?friend=nuxt" target="_blank"}
Watch Vue School video about using Nuxt lifecycle hooks in modules.
::
@ -764,7 +764,7 @@ The module starter comes with a default set of tools and configurations (e.g. ES
[Nuxt Module ecosystem](/modules) represents more than 15 million monthly NPM downloads and provides extended functionalities and integrations with all sort of tools. You can be part of this ecosystem!
::tip{icon="i-ph-video-duotone" to="https://vueschool.io/lessons/exploring-nuxt-modules-ecosystem-and-module-types?friend=nuxt" target="_blank"}
::tip{icon="i-ph-video" to="https://vueschool.io/lessons/exploring-nuxt-modules-ecosystem-and-module-types?friend=nuxt" target="_blank"}
Watch Vue School video about Nuxt module types.
::

View File

@ -1,3 +1,3 @@
title: Going Further
titleTemplate: '%s · Nuxt Advanced'
icon: i-ph-star-duotone
icon: i-ph-star

View File

@ -1,3 +1,3 @@
title: Recipes
titleTemplate: '%s · Recipes'
icon: i-ph-cooking-pot-duotone
icon: i-ph-cooking-pot

View File

@ -1,2 +1,2 @@
title: 'Guide'
icon: i-ph-book-open-duotone
icon: i-ph-book-open

View File

@ -1,3 +1,3 @@
title: 'Components'
titleTemplate: '%s · Nuxt Components'
icon: i-ph-cube-duotone
icon: i-ph-cube

View File

@ -1,3 +1,3 @@
title: 'Composables'
titleTemplate: '%s · Nuxt Composables'
icon: i-ph-arrows-left-right-duotone
icon: i-ph-arrows-left-right

View File

@ -74,7 +74,7 @@ const { data, status, error, refresh, clear } = await useFetch('/api/auth/login'
If you encounter the `data` variable destructured from a `useFetch` returns a string and not a JSON parsed object then make sure your component doesn't include an import statement like `import { useFetch } from '@vueuse/core`.
::
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=njsGVmcWviY" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=njsGVmcWviY" target="_blank"}
Watch the video from Alexander Lichter to avoid using `useFetch` the wrong way!
::

View File

@ -138,7 +138,7 @@ Nuxt exposes the following properties through `ssrContext`:
Since [Nuxt v3.4](https://nuxt.com/blog/v3-4#payload-enhancements), it is possible to define your own reducer/reviver for types that are not supported by Nuxt.
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=8w6ffRBs8a4" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=8w6ffRBs8a4" target="_blank"}
Watch a video from Alexander Lichter about serializing payloads, especially with regards to classes.
::

View File

@ -25,7 +25,7 @@ Because the data inside `useState` will be serialized to JSON, it is important t
`useState` is a reserved function name transformed by the compiler, so you should not name your own function `useState`.
::
::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=mv0WcBABcIk" target="_blank"}
::tip{icon="i-ph-video" to="https://www.youtube.com/watch?v=mv0WcBABcIk" target="_blank"}
Watch a video from Alexander Lichter about why and when to use `useState()`.
::

View File

@ -10,11 +10,11 @@ links:
Nuxt uses [ofetch](https://github.com/unjs/ofetch) to expose globally the `$fetch` helper for making HTTP requests within your Vue app or API routes.
::tip{icon="i-ph-rocket-launch-duotone" color="gray"}
::tip{icon="i-ph-rocket-launch" color="gray"}
During server-side rendering, calling `$fetch` to fetch your internal [API routes](/docs/guide/directory-structure/server) will directly call the relevant function (emulating the request), **saving an additional API call**.
::
::note{color="blue" icon="i-ph-info-duotone"}
::note{color="blue" icon="i-ph-info"}
Using `$fetch` in components without wrapping it with [`useAsyncData`](/docs/api/composables/use-async-data) causes fetching the data twice: initially on the server, then again on the client-side during hydration, because `$fetch` does not transfer state from the server to the client. Thus, the fetch will be executed on both sides because the client has to get the data again.
::

View File

@ -1,3 +1,3 @@
title: 'Utils'
titleTemplate: '%s · Nuxt Utils'
navigation.icon: i-ph-function-duotone
navigation.icon: i-ph-function

View File

@ -0,0 +1,33 @@
---
title: 'createEventLoader'
description: A utility function to select the events used for event-based delayed hydration.
links:
- label: Source
icon: i-simple-icons-github
to: https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/composables/hydrate.ts
size: xs
---
You can use this utility to set specific events that would trigger hydration in event-based delayed hydration components.
## Parameters
- `options`: An array of valid HTML events.
## Example
If you would like to trigger hydration when the element is either clicked or has the mouse over it:
```vue [pages/index.vue]
<template>
<div>
<LazyEventMyComponent :hydrate="createEventLoader(['click','mouseover'])"/>
</div>
<template>
```
::read-more{to="/docs/guide/directory-structure/components#delayed-hydration"}
::
::read-more{to="https://developer.mozilla.org/en-US/docs/Web/API/Element#events"}
Read more on the possible events that can be used.
::

View File

@ -0,0 +1,33 @@
---
title: 'createIdleLoader'
description: A utility function to customize delayed hydration based on network idle time.
links:
- label: Source
icon: i-simple-icons-github
to: https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/composables/hydrate.ts
size: xs
---
You can use this utility to customize the timeout of delayed hydration components based on network idle time.
## Parameters
- `timeout` : `number`
## Example
If you would like to give a timeout of 5 seconds for the components:
```vue [pages/index.vue]
<template>
<div>
<LazyIdleMyComponent :hydrate="createIdleLoader(5000)"/>
</div>
<template>
```
::read-more{to="/docs/guide/directory-structure/components#delayed-hydration"}
::
::read-more{to="https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback"}
This is based on the `requestIdleCallback` web API, and therefore only accepts the time in milliseconds for the max idle callback duration, which should be a number.
::

View File

@ -0,0 +1,33 @@
---
title: 'createVisibleLoader'
description: A utility function to customize delayed hydration based on visibility properties.
links:
- label: Source
icon: i-simple-icons-github
to: https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/composables/hydrate.ts
size: xs
---
You can use this utility to customize the conditions through which delayed hydration components would hydrate, based on their visiblity status and properties.
## Parameters
- `options`: `{ root, rootMargin, threshold }`
## Example
If you would like to change the threshold of the element:
```vue [pages/index.vue]
<template>
<div>
<LazyVisibleMyComponent :hydrate="createVisibleLoader({threshold: 0.2})"/>
</div>
<template>
```
::read-more{to="/docs/guide/directory-structure/components#delayed-hydration"}
::
::read-more{to="https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API"}
This is based on the `IntersectionObserver` web API, and therefore only accepts the API's properties. You can specify only part of the properties, while the rest will default to the web API's defaults.
::

View File

@ -8,7 +8,7 @@ links:
size: xs
---
::read-more{to="/docs/guide/going-further/experimental-features#inlinerouterules" icon="i-ph-star-duotone"}
::read-more{to="/docs/guide/going-further/experimental-features#inlinerouterules" icon="i-ph-star"}
This feature is experimental and in order to use it you must enable the `experimental.inlineRouteRules` option in your `nuxt.config`.
::
@ -47,6 +47,6 @@ When running [`nuxt build`](/docs/api/commands/build), the home page will be pre
For more control, such as if you are using a custom `path` or `alias` set in the page's [`definePageMeta`](/docs/api/utils/define-page-meta), you should set `routeRules` directly within your `nuxt.config`.
::read-more{to="/docs/guide/concepts/rendering#hybrid-rendering" icon="i-ph-medal-duotone"}
::read-more{to="/docs/guide/concepts/rendering#hybrid-rendering" icon="i-ph-medal"}
Read more about the `routeRules`.
::

View File

@ -10,7 +10,7 @@ links:
Preloading routes loads the components of a given route that the user might navigate to in future. This ensures that the components are available earlier and less likely to block the navigation, improving performance.
::tip{icon="i-ph-rocket-launch-duotone" color="gray"}
::tip{icon="i-ph-rocket-launch" color="gray"}
Nuxt already automatically preloads the necessary routes if you're using the `NuxtLink` component.
::

View File

@ -14,7 +14,7 @@ links:
By default, it will also save the current `state` of your app (that is, any state you could access with `useState`).
::read-more{to="/docs/guide/going-further/experimental-features#restorestate" icon="i-ph-star-duotone"}
::read-more{to="/docs/guide/going-further/experimental-features#restorestate" icon="i-ph-star"}
You can enable experimental restoration of this state by enabling the `experimental.restoreState` option in your `nuxt.config` file.
::

View File

@ -1,3 +1,3 @@
title: 'Commands'
icon: i-ph-terminal-window-duotone
icon: i-ph-terminal-window
titleTemplate: '%s · Nuxt Commands'

View File

@ -211,7 +211,7 @@ Type of path to resolve. If set to `'file'`, the function will try to resolve a
Creates resolver relative to base path.
::tip{icon="i-ph-video-duotone" to="https://vueschool.io/lessons/resolving-paths-and-injecting-assets-to-the-app?friend=nuxt" target="_blank"}
::tip{icon="i-ph-video" to="https://vueschool.io/lessons/resolving-paths-and-injecting-assets-to-the-app?friend=nuxt" target="_blank"}
Watch Vue School video about createResolver.
::

View File

@ -18,7 +18,7 @@ These functions are designed for registering your own utils, composables and Vue
Nuxt auto-imports helper functions, composables and Vue APIs to use across your application without explicitly importing them. Based on the directory structure, every Nuxt application can also use auto-imports for its own composables and plugins. Composables or plugins can use these functions.
::tip{icon="i-ph-video-duotone" to="https://vueschool.io/lessons/expanding-nuxt-s-auto-imports?friend=nuxt" target="_blank"}
::tip{icon="i-ph-video" to="https://vueschool.io/lessons/expanding-nuxt-s-auto-imports?friend=nuxt" target="_blank"}
Watch Vue School video about Auto-imports Nuxt Kit utilities.
::

View File

@ -10,7 +10,7 @@ links:
Components are the building blocks of your Nuxt application. They are reusable Vue instances that can be used to create a user interface. In Nuxt, components from the components directory are automatically imported by default. However, if you need to import components from an alternative directory or wish to selectively import them as needed, `@nuxt/kit` provides the `addComponentsDir` and `addComponent` methods. These utils allow you to customize the component configuration to better suit your needs.
::tip{icon="i-ph-video-duotone" to="https://vueschool.io/lessons/injecting-components-and-component-directories?friend=nuxt" target="_blank"}
::tip{icon="i-ph-video" to="https://vueschool.io/lessons/injecting-components-and-component-directories?friend=nuxt" target="_blank"}
Watch Vue School video about injecting components.
::

View File

@ -12,7 +12,7 @@ links:
In Nuxt 3, routes are automatically generated based on the structure of the files in the `pages` directory. However, there may be scenarios where you'd want to customize these routes. For instance, you might need to add a route for a dynamic page not generated by Nuxt, remove an existing route, or modify the configuration of a route. For such customizations, Nuxt offers the `extendPages` feature, which allows you to extend and alter the pages configuration.
::tip{icon="i-ph-video-duotone" to="https://vueschool.io/lessons/extend-and-alter-nuxt-pages?friend=nuxt" target="_blank"}
::tip{icon="i-ph-video" to="https://vueschool.io/lessons/extend-and-alter-nuxt-pages?friend=nuxt" target="_blank"}
Watch Vue School video about extendPages.
::
@ -71,7 +71,7 @@ Nuxt is powered by the [Nitro](https://nitro.unjs.io) server engine. With Nitro,
You can read more about Nitro route rules in the [Nitro documentation](https://nitro.unjs.io/guide/routing#route-rules).
::
::tip{icon="i-ph-video-duotone" to="https://vueschool.io/lessons/adding-route-rules-and-route-middlewares?friend=nuxt" target="_blank"}
::tip{icon="i-ph-video" to="https://vueschool.io/lessons/adding-route-rules-and-route-middlewares?friend=nuxt" target="_blank"}
Watch Vue School video about adding route rules and route middelwares.
::
@ -192,7 +192,7 @@ Route middlewares can be also defined in plugins via [`addRouteMiddleware`](/doc
Read more about route middlewares in the [Route middleware documentation](/docs/getting-started/routing#route-middleware).
::
::tip{icon="i-ph-video-duotone" to="https://vueschool.io/lessons/adding-route-rules-and-route-middlewares?friend=nuxt" target="_blank"}
::tip{icon="i-ph-video" to="https://vueschool.io/lessons/adding-route-rules-and-route-middlewares?friend=nuxt" target="_blank"}
Watch Vue School video about adding route rules and route middelwares.
::

View File

@ -14,7 +14,7 @@ Plugins are self-contained code that usually add app-level functionality to Vue.
Registers a Nuxt plugin and to the plugins array.
::tip{icon="i-ph-video-duotone" to="https://vueschool.io/lessons/injecting-plugins?friend=nuxt" target="_blank"}
::tip{icon="i-ph-video" to="https://vueschool.io/lessons/injecting-plugins?friend=nuxt" target="_blank"}
Watch Vue School video about addPlugin.
::
@ -114,7 +114,7 @@ export default defineNuxtPlugin((nuxtApp) => {
Adds a template and registers as a nuxt plugin. This is useful for plugins that need to generate code at build time.
::tip{icon="i-ph-video-duotone" to="https://vueschool.io/lessons/injecting-plugin-templates?friend=nuxt" target="_blank"}
::tip{icon="i-ph-video" to="https://vueschool.io/lessons/injecting-plugin-templates?friend=nuxt" target="_blank"}
Watch Vue School video about addPluginTemplate.
::

View File

@ -1,3 +1,3 @@
title: Nuxt Kit
navigation.icon: i-ph-toolbox-duotone
navigation.icon: i-ph-toolbox
titleTemplate: '%s · Nuxt Kit'

View File

@ -1 +1 @@
icon: i-ph-brain-duotone
icon: i-ph-brain

View File

@ -2,7 +2,7 @@
title: Nuxt Configuration
titleTemplate: '%s'
description: Discover all the options you can use in your nuxt.config.ts file.
navigation.icon: i-ph-gear-duotone
navigation.icon: i-ph-gear
---
::note{icon="i-simple-icons-github" color="gray" to="https://github.com/nuxt/nuxt/tree/main/packages/schema/src/config" target="_blank"}

View File

@ -7,25 +7,25 @@ surround: false
---
::card-group
::card{icon="i-ph-cube-duotone" title="Components" to="/docs/api/components/client-only"}
::card{icon="i-ph-cube" title="Components" to="/docs/api/components/client-only"}
Explore Nuxt built-in components for pages, layouts, head, and more.
::
::card{icon="i-ph-arrows-left-right-duotone" title="Composables" to="/docs/api/composables/use-app-config"}
::card{icon="i-ph-arrows-left-right" title="Composables" to="/docs/api/composables/use-app-config"}
Discover Nuxt composable functions for data-fetching, head management and more.
::
::card{icon="i-ph-function-duotone" title="Utils" to="/docs/api/utils/dollarfetch"}
::card{icon="i-ph-function" title="Utils" to="/docs/api/utils/dollarfetch"}
Learn about Nuxt utility functions for navigation, error handling and more.
::
::card{icon="i-ph-terminal-window-duotone" title="Commands" to="/docs/api/commands/add"}
::card{icon="i-ph-terminal-window" title="Commands" to="/docs/api/commands/add"}
List of Nuxt CLI commands to init, analyze, build, and preview your application.
::
::card{icon="i-ph-toolbox-duotone" title="Nuxt Kit" to="/docs/api/kit/modules"}
::card{icon="i-ph-toolbox" title="Nuxt Kit" to="/docs/api/kit/modules"}
Understand Nuxt Kit utilities to create modules and control Nuxt.
::
::card{icon="i-ph-brain-duotone" title="Advanced" to="/docs/api/advanced/hooks"}
::card{icon="i-ph-brain" title="Advanced" to="/docs/api/advanced/hooks"}
Go deep in Nuxt internals with Nuxt lifecycle hooks.
::
::card{icon="i-ph-gear-duotone" title="Nuxt Configuration" to="/docs/api/nuxt-config"}
::card{icon="i-ph-gear" title="Nuxt Configuration" to="/docs/api/nuxt-config"}
Explore all Nuxt configuration options to customize your application.
::
::

View File

@ -2,7 +2,7 @@
title: Getting Help
description: We're a friendly community of developers and we'd love to help.
navigation:
icon: i-ph-lifebuoy-duotone
icon: i-ph-lifebuoy
---
At some point, you may find that there's an issue you need some help with.

View File

@ -1,7 +1,7 @@
---
title: 'Reporting Bugs'
description: 'One of the most valuable roles in open source is taking the time to report bugs helpfully.'
navigation.icon: i-ph-bug-duotone
navigation.icon: i-ph-bug
---
Try as we might, we will never completely eliminate bugs.

View File

@ -1,7 +1,7 @@
---
title: 'Contribution'
description: 'Nuxt is a community project - and so we love contributions of all kinds! ❤️'
navigation.icon: i-ph-git-pull-request-duotone
navigation.icon: i-ph-git-pull-request
---
There is a range of different ways you might be able to contribute to the Nuxt ecosystem.
@ -184,21 +184,21 @@ Here are some tips that may help improve your documentation:
Keep in mind your readers can have different backgrounds and experiences. Therefore, these words don't convey meaning and can be harmful.
::caution{ icon="i-ph-x-circle-duotone"}
::caution{ icon="i-ph-x-circle"}
Simply make sure the function returns a promise.
::
::tip{icon="i-ph-check-circle-duotone"}
::tip{icon="i-ph-check-circle"}
Make sure the function returns a [promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
::
* Prefer [active voice](https://developers.google.com/tech-writing/one/active-voice).
::caution{icon="i-ph-x-circle-duotone"}
::caution{icon="i-ph-x-circle"}
An error will be thrown by Nuxt.
::
::tip{icon="i-ph-check-circle-duotone"}
::tip{icon="i-ph-check-circle"}
Nuxt will throw an error.
::

View File

@ -1,6 +1,6 @@
---
title: 'Framework'
navigation.icon: i-ph-github-logo-duotone
navigation.icon: i-ph-github-logo
description: Some specific points about contributions to the framework repository.
---

View File

@ -1,7 +1,7 @@
---
title: 'Roadmap'
description: 'Nuxt is constantly evolving, with new features and modules being added all the time.'
navigation.icon: i-ph-map-trifold-duotone
navigation.icon: i-ph-map-trifold
---
::read-more{to="/blog"}

View File

@ -1,7 +1,7 @@
---
title: 'Releases'
description: Discover the latest releases of Nuxt & Nuxt official modules.
navigation.icon: i-ph-notification-duotone
navigation.icon: i-ph-notification
---
::card-group

View File

@ -1,3 +1,3 @@
title: 'Community'
titleTemplate: '%s · Nuxt Community'
icon: i-ph-chats-teardrop-duotone
icon: i-ph-chats-teardrop

View File

@ -1,3 +1,3 @@
titleTemplate: 'Migrate to Nuxt Bridge: %s'
title: 'Migrate to Nuxt Bridge'
icon: i-ph-bridge-duotone
icon: i-ph-bridge

View File

@ -9,7 +9,7 @@ Nuxt 3 has a basic backward compatibility layer for Nuxt 2 modules using `@nuxt/
We have prepared a [Dedicated Guide](/docs/guide/going-further/modules) for authoring Nuxt 3 ready modules using `@nuxt/kit`. Currently best migration path is to follow it and rewrite your modules. Rest of this guide includes preparation steps if you prefer to avoid a full rewrite yet making modules compatible with Nuxt 3.
::tip{icon="i-ph-puzzle-piece-duotone" to="/modules"}
::tip{icon="i-ph-puzzle-piece" to="/modules"}
Explore Nuxt 3 compatible modules.
::

View File

@ -1,3 +1,3 @@
titleTemplate: 'Migrate to Nuxt 3: %s'
title: 'Migrate to Nuxt 3'
icon: i-ph-arrow-circle-up-duotone
icon: i-ph-arrow-circle-up

View File

@ -1,2 +1,2 @@
title: Docs
icon: i-ph-book-bookmark-duotone
icon: i-ph-book-bookmark

Some files were not shown because too many files have changed in this diff Show More