admin管理员组文章数量:1124558
I've been trying to set up BrowserSync for my WordPress theme running locally with Local by Flywheel. Basically I followed this guide:
However, the page will hot reload only when changes in my CSS and JS files are being made - changes in my PHP files don't trigger anything. Even after hard refreshing the page myself, the changes still won't reflect in the proxy URL BrowserSync creates. They will appear in the Local URL fine though.
From what I have read, it seems like this could be because BrowserSync needs body tags for the script it inserts but the PHP files are all split up.
That blog post doesn't mention anything though so I'm at a loss. I've tried specifying the files in the mix.browserSync options parameter in the different ways below, but I get the same result. I'd be grateful if anyone could share what might be going wrong.
mix.browserSync({
proxy: `http://<my-site>.local`,
files: [
`**/*`,
`**/*.php`,
`example-file.php`,
`assets/js/main.min.js`,
`assets/css/main.min.css`,
]
});
本文标签: BrowserSync not detecting PHP files in WordPressLaravel Mix
版权声明:本文标题:BrowserSync not detecting PHP files in WordPress + Laravel Mix 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736635048a1945859.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论