You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**loaders:** ensure loads when a navigation is missed ([b799598](https://github.com/posva/unplugin-vue-router/commit/b799598bde55e77cd7266f97efbe3c9e450f9b2d)), closes [#495](https://github.com/posva/unplugin-vue-router/issues/495)
7
+
-**loaders:** make data possibly undefined in some cases([#506](https://github.com/posva/unplugin-vue-router/issues/506)) ([10112a0](https://github.com/posva/unplugin-vue-router/commit/10112a0309e27b8caffb1990740081d286fd84a7))
8
+
- upgrade support for pinia colada 0.13.0 ([b01dce4](https://github.com/posva/unplugin-vue-router/commit/b01dce4f4cdb47e22efe9c00ea902a9f1d3316a5))
9
+
10
+
### Features
11
+
12
+
-**data-loaders:** adapt colada to support always defined data ([a1cda5d](https://github.com/posva/unplugin-vue-router/commit/a1cda5de246cc2931bb3a311c52cdc340e1bcf33))
13
+
-**data-loaders:** allow `data` to always be defined ([7cf7796](https://github.com/posva/unplugin-vue-router/commit/7cf7796ca82e2589b68882bfef708c755b65c77b)), closes [#319](https://github.com/posva/unplugin-vue-router/issues/319)
14
+
-**data-loaders:** allow default type for errors ([5ec4076](https://github.com/posva/unplugin-vue-router/commit/5ec4076add65bbfa62a57c2c1cb8e230c6ba3e1b))
- support vite 6 ([b1c4f6c](https://github.com/posva/unplugin-vue-router/commit/b1c4f6c16cb14cd60bce677e77b1d0cd8ef6afc9))
17
+
18
+
### BREAKING CHANGES
19
+
20
+
-**data-loaders:** The default type for `error` is now `Error`.
21
+
-**data-loaders:** Based on the `options` passed to a `defineLoader()` function, the `data` will now be possibly `undefined`. This enables a more convenient typing
@@ -169,8 +191,8 @@ internally to represent the folder structure.
169
191
170
192
This patch contains the necessary fixes to allow importing the data loaders. However, they cannot be imported from `vue-router/auto` nor from `unplugin-vue-router/runtime`. Instead, they should be imported from `unplugin-vue-router/data-loaders/...`. This is needed as some of the loaders depends on extra packages that not all users have installed. At the moment, there are two data loaders
Based on the feedback of the RFC, the Data Loaders have been redesigned from the ground up and are now way more flexible and powerful. As a result, if you were using the experimental data loaders, make sure to check the list of breaking changes and the new RFC at https://uvr.esm.is/rfcs/data-loaders. We are looking for early testers and feedback!
225
+
Based on the feedback of the RFC, the Data Loaders have been redesigned from the ground up and are now way more flexible and powerful. As a result, if you were using the experimental data loaders, make sure to check the list of breaking changes and the new RFC at <https://uvr.esm.is/rfcs/data-loaders>. We are looking for early testers and feedback!
204
226
205
227
For people using the file-based routing, you now need to add `unplugin-vue-router/client` to the `types` property of your tsconfig. See [setup](https://uvr.esm.is/introduction.html#setup) for an example.
206
228
@@ -260,7 +282,7 @@ For people using the file-based routing, you now need to add `unplugin-vue-route
260
282
moved out of the basic loader to an extended one [pinia-colada](https://uvr.esm.is/data-loaders/colada/) and the [basic loader](https://uvr.esm.is/data-loaders/basic/)
261
283
has no cache. All of the pending bugs have also been fixed.
262
284
I recommend you to give the RFC examples a new read to get
263
-
setup: https://uvr.esm.is/data-loaders/rfc. Most of the changes are
285
+
setup: <https://uvr.esm.is/data-loaders/rfc>. Most of the changes are
264
286
simplifying things by removing them.
265
287
Here is a list of the breaking changes to simplify
266
288
migration:
@@ -269,9 +291,9 @@ For people using the file-based routing, you now need to add `unplugin-vue-route
269
291
- Manual work needed to add loaders with `HasDataLoaderMeta` has been
270
292
removed. It is just no longer needed. Loaders are picked up from lazy
271
293
loaded components and must otherwise be directly added to a `meta.loaders`
272
-
array. See the example at https://uvr.esm.is/data-loaders/rfc.html#basic-example
294
+
array. See the example at <https://uvr.esm.is/data-loaders/rfc.html#basic-example>
273
295
- The function `setupDataFetchingGuard` has been replaced with a Vue
274
-
Plugin. See https://uvr.esm.is/data-loaders/rfc.html#data-loader-setup
296
+
Plugin. See <https://uvr.esm.is/data-loaders/rfc.html#data-loader-setup>
275
297
for details.
276
298
- If you were relying on `cacheTime`, use the `staleTime` option in the
277
299
new [`defineColadaLoader()`](https://uvr.esm.is/rfcs/data-loaders/colada) based off [@pinia/colada](https://github.com/posva/pinia-colada)
@@ -323,7 +345,7 @@ For people using the file-based routing, you now need to add `unplugin-vue-route
323
345
by adding a library that properly handles the caching. This new strategy
324
346
will also enable other integrations like VueFire, Apollo, and custom
325
347
ones. Keep an eye (subscribe) to the RFC for news and to discus about
326
-
the future of Data Loaders: https://github.com/vuejs/rfcs/discussions/460
348
+
the future of Data Loaders: <https://github.com/vuejs/rfcs/discussions/460>
327
349
- since data loaders aren't meant to be awaited in script
328
350
setup (they are awaited at the navigation level), they now return a
329
351
promise of the raw data only, not of the UseDataLoaderReturn, to make it
0 commit comments