本文介绍了BrowserSync极其缓慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢使用的发展。不过,页面加载(不仅是更改后重装)极为缓慢。

I would love to use BrowserSync for development. However, page loading (not only reloading after changes) is extremely slow.

我用代理模式。浏览网页,而不BrowserSync是快,因为它应该的。

I use the proxy mode. Browsing the page without BrowserSync is fast as it should be.

一个原因可能是以下错误:

One reason may be the following error when I install BrowserSync:

> [email protected] install /usr/local/lib/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/bufferutil.node
SOLINK_MODULE(target) Release/bufferutil.node: Finished
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/validation.node
SOLINK_MODULE(target) Release/validation.node: Finished

我安装从头节点(使用 BREW 和安装程序包),但无法摆脱的错误。

I installed node from scratch (using brew and the package installer), but couldn't get rid of the error.

此外,它不会如果使用咕嘟咕嘟或命令行运行过BrowserSync有所作为。

Furthermore, it doesn't make a difference if BrowserSync is run using Gulp or over the command line.

任何想法?

推荐答案

解决的办法很简单 - 但恕我直言不合逻辑。我曾在 HTTP运行我的本地实例://project.local 。将其更改为 http://project.dev 解决了问题。我运行OS X的。

The solution is quite simple - but illogical imho. I had my local instance running under http://project.local. Changing it to http://project.dev solved the issue. I'm running OS X.

这篇关于BrowserSync极其缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-15 12:14