|
2 | 2 |
|
3 | 3 | Follow this guide to upgrade from one major version to the other.
|
4 | 4 |
|
| 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 | + |
5 | 60 | ## Upgrading from 3.x to 4.x
|
6 | 61 |
|
7 | 62 | ### In-component options key
|
|
0 commit comments