Skip to content

Commit 5c4e8ab

Browse files
authored
docs: Document 4.x to 5.x and 5.x to 6.x migration paths (nuxt-modules#419)
1 parent 05e9d1f commit 5c4e8ab

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ All notable changes to this project will be documented in this file. See [standa
5656

5757
### BREAKING CHANGES
5858

59+
[5.x to 6.x migration path](https://nuxt-community.github.io/nuxt-i18n/migrating.html#upgrading-from-5-x-to-6-x)
60+
5961
* Store module's options have been flattened and renamed
6062
* The mutations responsible for syncing nuxt-i18n's store module with vue-i18n's
6163
locale and messages are now disabled by default, you'll need to manually re-enable them in the
@@ -464,6 +466,8 @@ cannot be set via the configuration anymore
464466

465467
### BREAKING CHANGES
466468

469+
[4.x to 5.x migration path](https://nuxt-community.github.io/nuxt-i18n/migrating.html#upgrading-from-4-x-to-5-x)
470+
467471
* [https://github.com/kazupon/vue-i18n/blob/dev/CHANGELOG.md#800-2018-06-23](https://github.com/kazupon/vue-i18n/blob/dev/CHANGELOG.md#800-2018-06-23)
468472

469473

@@ -509,6 +513,8 @@ cannot be set via the configuration anymore
509513

510514
### BREAKING CHANGES
511515

516+
[3.x to 4.x migration path](https://nuxt-community.github.io/nuxt-i18n/migrating.html#upgrading-from-3-x-to-4-x)
517+
512518
* Pages using i18n key need to be updated to use nuxtI18n key instead
513519

514520

docs/migrating.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,61 @@
22

33
Follow this guide to upgrade from one major version to the other.
44

5+
6+
## Upgrading from 5.x to 6.x
7+
8+
### Global SEO features are now disabled by default
9+
10+
In some cases, having SEO enabled globally caused performance issues and/or conflicted with other plugins. To mitigate these issues, SEO features are now disabled by default.
11+
12+
If you were affected by one of the issues above, we recommend that you read the [Improve performances](https://nuxt-community.github.io/nuxt-i18n/seo.html#improving-performance) section to enable SEO only where you need it.
13+
14+
If you'd like to restore the old behaviour, you can reenable SEO features globally by setting the `seo` option to `true`:
15+
16+
```js
17+
{
18+
seo: true
19+
}
20+
```
21+
22+
### preserveState can't be set anymore
23+
24+
It was previously possible to manually set `preserveState` on **nuxt-i18n**'s store module, which would actually result in unexpected behaviours when using server-side rendering. This option has been removed altogether and the module's `preserveState` option is now [set automatically](https://github.com/nuxt-community/nuxt-i18n/blob/05e9d1f80715cc23a545adf4303e49af3ee40ac3/src/plugins/main.js#L77).
25+
26+
If you were using the `preserveState` configuration option before, it can be safely removed:
27+
28+
```patch
29+
{
30+
vuex: {
31+
- preserveState: true,
32+
// other configuration options
33+
}
34+
}
35+
```
36+
37+
### Store module options have been flattened and renamed
38+
39+
The `vuex` configuration option used to expose a `mutations` property where each mutation could be disabled or renamed. For the sake of simplicity, it isn't possible to rename these mutations anymore, the `mutations` property has been dropped to flatten the configuration and each option has been renamed to better reflect what it does.
40+
41+
```patch
42+
{
43+
vuex: {
44+
- mutations: {
45+
- setLocale: 'SET_LOCALE_MUTATION',
46+
- setMessages: 'SET_MESSAGE_MUTATION',
47+
- setRouteParams: 'SET_ROUTE_PARAMS_MUTATION'
48+
- }
49+
+ syncLocale: true,
50+
+ syncMessages: true,
51+
+ syncRouteParams: true
52+
},
53+
}
54+
```
55+
56+
## Upgrading from 4.x to 5.x
57+
58+
Please refer to [**vue-i18n**'s changelog](https://github.com/kazupon/vue-i18n/blob/dev/CHANGELOG.md#800-2018-06-23) for more information on breaking changes in **nuxt-i18n 5.x**.
59+
560
## Upgrading from 3.x to 4.x
661

762
### In-component options key

0 commit comments

Comments
 (0)