1.1.0 Backward incompatible changes reference

In this document, you can see crucial breaking changes in the 1.1.0 compared to 1.0.2 release. To see all changes, please take a look at the release pull request. (opens new window)

feat!: implement Magento URL rewrites

https://github.com/vuestorefront/magento2/pull/1321/files (opens new window)

File What was changed
[!] packages/theme/middleware/url-resolver.ts A new, rewrite-aware URL resolver is added.
[!] packages/theme/modules/catalog/index.ts Routes configuration is removed.
[!] packages/theme/stores/page.ts Add Pinia PageStore to store route data state for pages.
packages/api-client/src/api/route/route.ts The query data structure is modified: relative_url and redirect_code are removed.
packages/theme/composables/useUiHelpers/index.ts The category prefix is removed from the category URL string.
packages/theme/modules/catalog/category/helpers/useTraverseCategory.ts The category prefix is removed from the category URL string.
packages/theme/modules/catalog/product/composables/useProduct/useProduct.ts Add getProductPath method. Get a product path from url_rewrites or url_key.
packages/theme/helpers/cart/addToCart.ts GroupedProduct’s add-to-cart URL resolution is simplified and replaced with the getProductPath.
packages/theme/modules/catalog/category/components/views/useProductsWithCommonCardProps.ts Product link URL resolution is simplified and replaced with the getProductPath.
packages/theme/modules/customer/pages/MyAccount/MyWishlist.vue Product link URL resolution is simplified and replaced with the getProductPath.
packages/theme/modules/catalog/product/components/ProductsCarousel.vue Product link URL resolution is simplified and replaced with the getProductPath.
packages/theme/modules/GraphQL/types.ts Add missing optional fields on the RoutableInterface

Notes: If you are using in your project old, prefixed URL or URL resolvers, replace them with the usage of the new useProduct::getProductPath

Notes: The old routing system is replaced with a Magento route type resolver. Previously, VSF was able to route to a CMS, Category, or Product page based on the URL prefix. Currently, the renderer type is resolved based on the GraphQL route query and the route type field.