☰
1、环境需求
nodejs >= 10.14.1 LTS // https://nodejs.org/en/
yarn >= 1.13.0 // https://yarnpkg.com/
一个magento对应pwa studio版本demo,该demo域名必须配置ssl
2、获取pwa-studio库
git clone https://github.com/magento/pwa-studio.git3、进入pwa-studio根目录 cd pwa-studio/
yarn instal4、创建项目.env文件
MAGENTO_BACKEND_URL="https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/" \
CHECKOUT_BRAINTREE_TOKEN="sandbox_8yrzsvtm_s2bg8fs563crhqzk" \
yarn buildpack create-env-file packages/venia-concept5、生成静态问件
yarn run build
运行服务
yarn run watch:venia //运行开发环境
yarn run watch:all //运行完整的开发环境
yarn run build && yarn run stage:venia //生成静态文件,并运行生产环境