Can any guide me how to integrate pwa for already existing magento 2 project without collapsing previous theme
-
1Possible duplicate of PWA Setup in Magento 2.3.0 – Sanjay Gohil Jul 16 '19 at 10:21
Now clone pwa-studio repository
git clone https://github.com/magento-research/pwa-studio.git
You have to clone this repository in magento root directory ex: /var/www/html/magento
You will see the pwa-studio directory in /var/www/html/magento
.
Enter into this directoy:
cd pwa-studio/
Specify the Magento backend server in .env
file. you can see the .env.dist
file in
/var/www/html/magento/pwa-studio/packages/venia-concept/
direcoty. If you are not
able see, enable show hidden files. Now create .env file from this env.dist
cp packages/venia-concept/.env.dist packages/venia-concept/.env
Open this .env
file and find MAGENTO_BACKEND_URL
. Here configure your
local Magento 2 instance, my case it is:
MAGENTO_BACKEND_URL="https://magento2-pwa.com/"
Find the deployVeniaSampleData.sh
file in
/var/www/html/mage0/pwa-studio/packages/venia-concept/
directory. and copy this
file in your Magento root directory. Now it must look like
/var/www/html/magento/deployVeniaSampleData.sh
Now run:
bash deployVeniaSampleData.sh
After successful installation run:
bin/magento setup:upgrade
bin/magento indexer:reindex
bin/magento cache:flush
Reference: https://webkul.com/blog/magento2-3-pwa-studio-setup/
I hope this will help
Nothing will hapen to your existing magento as PWA only needs API's from your Magento store.
Follow all steps mentioned here: https://magento-research.github.io/pwa-studio/venia-pwa-concept/setup/
only provide backend URL as your magento link and all data's will be fetched from this link.