Skip to content

Commit 6c123e8

Browse files
committed
Update README.md
Added extra information when running a newer version of browser-sync and trying to use the proxy option.
1 parent a5b8b73 commit 6c123e8

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,24 @@ browserSync.init(['css/*.css'], {
6868

6969
**Proxy**
7070

71+
Depending on what version of Browser Sync you're using, you will need to alter this configuration slightly.
72+
To check what version you're running, use: `npm view browser-sync version`
73+
7174
```js
72-
// Watch CSS files and use the proxy with your own server.
75+
// Watch CSS files and use the proxy with your own server. (For browser-sync versions < 0.7.0)
7376
browserSync.init(['css/*.css'], {
7477
proxy: {
7578
host: 'mylocal.dev',
7679
port: '8000'
7780
}
7881
});
7982

83+
// Watch CSS files and use the proxy with your own server. (For browser-sync versions >= 0.7.0)
84+
browserSync.init(['css/*.css'], {
85+
proxy: 'mylocal.dev:8000'
86+
});
87+
88+
8089
```
8190

8291
**Using along-side other watch tasks (SASS)**

0 commit comments

Comments
 (0)