Depending on the amounts of customisations you've made, there are some manual steps. Please follow the regular upgrade steps first.
@graphcommerce/graphcms-ui
is now @graphcommerce/hygraph-ui
@ducanh2912/next-pwa
replaced by serwist
next-sitemap
replaced by custom implementationThe ReactPlugin
TypeScript definition has been removed and only PluginProps
is available.
Replace
const MyPlugin: ReactPlugin<typeof OriginalComponent> = (props) => {
const { Prev, ...rest } = props
return <Prev {...rest} />
}
export const Plugin = MyPlugin
Now becomes:
const MyPlugin = (props: PluginProps<OriginalComponentProps>) => {
const { Prev, ...rest } = props
return <Prev {...rest} />
}
export const Plugin = MyPlugin
There is a new plugin configuration method by using
export config: PluginConfig = {}
.
linguiLocale: Custom locale used to load the .po files. Must be a valid locale, also used for Intl functions.
In the example below, the linguiLocale is not required for en
as en.po
exits, but it is required for fr-be
as only fr.po
exists. This thus also
allows you to create fr-be.po
and use that.
const config = {
storefront: [
{ locale: 'en', magentoStoreCode: 'en_US', defaultLocale: true },
{ locale: 'fr-be', magentoStoreCode: 'nl_NL', linguiLocale: 'fr' },
],
}
@graphcommerce/graphcms-ui
is now @graphcommerce/hygraph-ui
Replace all @graphcommerce/graphcms-ui
with @graphcommerce/hygraph-ui
.
@ducanh2912/next-pwa
replaced by serwist
Any customizations made to the service worker should
next-sitemap
replaced by custom implementation.