问题描述
我有关于Shopify的主题包和浏览器同步的问题。我的脚本中有一个带有此代码的package.json。但是,在我第一次更改代码时,浏览器不会显示更改,如果我手动刷新会显示。每隔一次浏览器同步工作正常。我想知道命令是否有问题。
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1","theme": "theme watch --allow-live --notify=themeWatchNotify","sync": "browser-sync start --proxy 'https://example.myshopify.com/' --files 'themeWatchNotify' --config bs-config.js"
}
解决方法
尝试添加--reload-delay 1000
。
themekit notify存在问题,似乎它在上传时并没有更新文件,而是在上传开始时更新了。