Browser-sync: How do i create config file?

Created on 16 May 2017  路  1Comment  路  Source: BrowserSync/browser-sync

Issue details

Config file always return

<script id="__bs_script__">//<![CDATA[
    document.write("<script async src='http://HOST:3000/browser-sync/browser-sync-client.js?v=2.18.8'><\/script>".replace(
"HOST", location.hostname));
//]]></script>

but when i start with browser-sync start --proxy "localhost/ecofarmmarketplaceV2" --files "*/" its normal

Steps to reproduce/test case

n/a

Please specify which version of Browsersync, node and npm you're running

  • Browsersync [2.18.8 ]
  • Node [7.9.0]
  • Npm [4.2.0]

Affected platforms

  • [ ] linux
  • [ x ] windows
  • [ ] OS X
  • [ ] freebsd
  • [ ] solaris
  • [ ] other _(please specify which)_

Browsersync use-case

  • [ ] API
  • [ ] Gulp
  • [ ] Grunt
  • [ x ] CLI

If CLI, please paste the entire command below

browser-sync start

for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync

module.exports = {
    port: 8052,
    open: false,
    server: {
        middleware: proxy('/api', {
            target: 'http://localhost:ecofarmmarketplaceV2/'
        })
    }
};

Most helpful comment

already solve it with

module.exports = {
    "ui": {
        "port": 3001,
        "weinre": {
            "port": 8080
        }
    },
    "files": false,
    "watchEvents": [
        "change"
    ],
    "proxy": {
        target: "localhost/ecofarmmarketplaceV2"
    },
    "port": 8052
};

and browser-sync start --config bs-config.js

>All comments

already solve it with

module.exports = {
    "ui": {
        "port": 3001,
        "weinre": {
            "port": 8080
        }
    },
    "files": false,
    "watchEvents": [
        "change"
    ],
    "proxy": {
        target: "localhost/ecofarmmarketplaceV2"
    },
    "port": 8052
};

and browser-sync start --config bs-config.js

Was this page helpful?
0 / 5 - 0 ratings

Related issues

npearson72 picture npearson72  路  3Comments

Hurtak picture Hurtak  路  3Comments

codeofsumit picture codeofsumit  路  3Comments

Zver64 picture Zver64  路  3Comments

w88975 picture w88975  路  3Comments