pwa storefront配置

magento 收藏
0 45

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.git

3、进入pwa-studio根目录 cd pwa-studio/

yarn instal

4、创建项目.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-concept

5、生成静态问件

yarn run build

运行服务

yarn run watch:venia    //运行开发环境
yarn run watch:all   //运行完整的开发环境
yarn run build && yarn run stage:venia  //生成静态文件,并运行生产环境



    暂时没有人评论
精选帖子
热门帖子
1创建flutter应用 93
2js 变量命令法 92
3回流和重绘 92
4js 添加邮箱验证 91
5应用配置 91
6flutter 构建模式 90
7在phtml中使用图片 89
8作用域 89
9v-if 和 v-else 89