|
| 1 | +# [0.9.0](https://github.com/posva/unplugin-vue-router/compare/v0.8.8...v0.9.0) (2024-05-28) |
| 2 | + |
| 3 | +### Bug Fixes |
| 4 | + |
| 5 | +- move extension handling outside of tree ([85d8472](https://github.com/posva/unplugin-vue-router/commit/85d8472a94fa8239d436e6a6fda0789363d085c3)), closes [#400](https://github.com/posva/unplugin-vue-router/issues/400) |
| 6 | +- remove wrong error log during HMR ([c511082](https://github.com/posva/unplugin-vue-router/commit/c51108294dd258e19266eba64eb11d7d5aec107a)) |
| 7 | +- require explicit `routes` import to avoid cyclic imports ([63788f6](https://github.com/posva/unplugin-vue-router/commit/63788f67072cc8557df2f87f258c4d6c91f20895)), closes [#132](https://github.com/posva/unplugin-vue-router/issues/132) |
| 8 | + |
| 9 | +### Code Refactoring |
| 10 | + |
| 11 | +- **pkg:** migrate package to type=module ([f1e4ca5](https://github.com/posva/unplugin-vue-router/commit/f1e4ca54695e89a8afb006ad448fbe537210cbc9)) |
| 12 | + |
| 13 | +### BREAKING CHANGES |
| 14 | + |
| 15 | +- `createRouter()` now requires the explicit `router` |
| 16 | + property to be set and imported: |
| 17 | + |
| 18 | +```diff |
| 19 | +import { createRouter, createWebHistory } from 'vue-router/auto' |
| 20 | ++import { routes } from 'vue-router/auto-routes' |
| 21 | + |
| 22 | +createRouter({ |
| 23 | + history: createWebHistory(), |
| 24 | ++ routes |
| 25 | +}) |
| 26 | +``` |
| 27 | + |
| 28 | +This also means that runtime `extendRoutes()` option is not needed. It |
| 29 | +has been deprecated and will be removed in the next major release. |
| 30 | + |
| 31 | +- `Tree` and `PrefixTree` insert method expects a path without the file |
| 32 | + extension. They also expect the fullpath of the file as a second |
| 33 | + argument (it used to be optional). This aligns better with their responsibility as they shouldn't be trimming the extension like they used to. |
| 34 | + |
| 35 | +```ts |
| 36 | +// replace |
| 37 | +tree.insert('file.vue') |
| 38 | +// with |
| 39 | +tree.insert('file', resolve('file.vue')) |
| 40 | +``` |
| 41 | + |
| 42 | +This shouldn't affect most users as the Tree implementation is used |
| 43 | +internally to represent the folder structure. |
| 44 | + |
| 45 | +- **pkg:** The package is now of `"type": "module"`. It shouldn't |
| 46 | + break anything for users but this is just in case, we all know how fragile this js ecosystem is sometimes... |
| 47 | + |
1 | 48 | ## [0.8.8](https://github.com/posva/unplugin-vue-router/compare/v0.8.7...v0.8.8) (2024-05-22)
|
2 | 49 |
|
3 | 50 | ### Bug Fixes
|
|
0 commit comments