This project is a Magento 2 integration for Vue Storefront 2.
Please follow the installation guide
Want to contribute? Ping us on magento2 channel on our Discord!
- NodeJS v16 or later
- Yarn (npm is not supprted yet)
- Magento >= v2.4.3 instance for GraphQL endpoint
- Change Magento GraphQL Query Complexity and Depth values
Don't forget to change the Magento GraphQL Query Complexity and Depth values Magento 2 by default has a lower value for the complexity of 300, and a higher value for the depth of 20. Magento 2 - Issue #32427
The changes are required, due to the size of the queries and mutations in the
api-clientimplementation.
To do this changes, you can use the Magento 2 module, which adds a configuration panel to your admin, or do this changes manually.
To install the Magento 2 GraphQL Config module, on your Magento installation execute:
composer require caravelx/module-graphql-config
php bin/magento module:enable Caravel_GraphQlConfig
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deployFind more information about the module GraphQl Custom Config
(Note: Currently only yarn is supported because of workspaces resolving. Do not use npm to install or build the project.)
- Fork the repo
- Clone your fork of the repo
git clone https://github.com/vuestorefront/magento2.git && cd magento2
- Checkout
developbranchgit checkout develop
- Run
yarnto install dependenciesyarn install
- Copy
.env.exampleto.envcp packages/theme/.env.example packages/theme/.env
- Update
MAGENTO_GRAPHQL_URLwith url to Magento >=2.4.2 GraphQL endpoint, and the other variable accordingly to your store configurations.MAGENTO_GRAPHQL_URL=https://{YOUR_SITE_FRONT_URL}/graphql - Build dependencies
yarn build:api-client && yarn build:composablesyarn build:api-client && yarn build:composables - Run
yarn dev:themeto run theme. You can find other commands inpackage.jsonyarn dev:theme
- If you need HMR on Api Client/Composables run
yarn dev:api-clientoryarn dev:composableson a separate terminal window.
If you have any questions about this integration we will be happy to answer them on magento2-vsf2 channel on our Discord.
Thanks go to these wonderful people π:
This project follows the all-contributors specification. Contributions of any kind welcome!
