Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept browser-sync config as a JS file to allow use of regexp and functions #377

Open
stu177 opened this issue Feb 12, 2020 · 2 comments
Open

Comments

@stu177
Copy link

stu177 commented Feb 12, 2020

For example with rewriteRules using regexp in the match:

rewriteRules = [
  {
    match: /mysite\.localtest\.me/g,
    replace: 'localhost:3000'
  },
]
@stu177 stu177 changed the title Accept browser-sync.json as a JS file to allow use of regexp and functions in config Accept browser-sync config as a JS file to allow use of regexp and functions Feb 12, 2020
@tommypyatt
Copy link

tommypyatt commented Jan 15, 2021

Hi @Igloczek. I assume you would want this to accept a JS file but still work if a JSON file is provided, rather than just enforcing JS instead of JSON, so as not to break backwards compatibility. Is this correct?

@Igloczek
Copy link
Contributor

Igloczek commented Jan 15, 2021

Actually, I've added a .js config files support with the 1.11.0 version, so you may want to try if it works okay with BS now. It does not work with BS, yet.

@tommypyatt absolutely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants