pwa storefront配置

magento 收藏
0 39

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在phtml中使用图片 80
2创建flutter应用 79
3js 变量命令法 78
4应用配置 78
5js 添加邮箱验证 77
6flutter 构建模式 77
7回流和重绘 77
8作用域 76
9const注意点 75