Skip to content

Can't get --extensions option to work when using CLI #1220

@axelboc

Description

@axelboc

Issue details

I can't seem to get vanity URLs (i.e. optional html extension) to work when running Browserify from the command line.

Steps to reproduce/test case

  1. Place two files, index.html and foo.html, inside a folder called public
  2. Add the following anchor link to index.html: <a href="/foo">foo</a>
  3. From the parent directory of public, run browser-sync start --server "public" --extensions "html"
  4. localhost:3000 opens and serves index.html automatically; select the link
  5. Browser (in my case Firefox) shows: "Cannot GET /foo"

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

  • Browsersync [ 2.17.0 ]
  • Node [ 6.5.0 ]
  • Npm [ 3.10.3 ]

Affected platforms

  • linux
  • windows
  • OS X
  • freebsd
  • solaris
  • other (please specify which)

Browsersync use-case

  • API
  • Gulp
  • Grunt
  • CLI

If CLI, please paste the entire command below

I tried:

browser-sync start --server "public" --extensions "html"
browser-sync start --server "public" --extensions ".html"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions