Skip to content

DEFECT: scriptPath non-functional #2090

@enspritz

Description

@enspritz

Issue details

scriptPath configuration option indeed changes the URL written into returned HTML documents, but the script is still only available at its default/original URL and not at the URL configured by scriptPath.

Steps to reproduce/test case

  1. Start BrowserSync with the following configuration:
    browser_sync.init({
                          scriptPath: (path) => "/abc" + path,
                      });
  1. Load an otherwise properly-functioning page in the browser without caching.
  2. In dev tools Network tab, note that the browser attempted to GET BrowserSync's configured URL at the correct URL i.e. http://localhost:8080/abc/browser-sync/browser-sync-client.js?v=3.0.3, but BrowserSync responded with 404.
  3. Attempts to GET the client script at its default/original URL succeed, also presumably incorrect. I.e. http://localhost:8080/browser-sync/browser-sync-client.js?v=3.0.3

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

  • Browsersync [ 3.0.3 ]
  • Node [ v22.7.0 ]
  • Npm [ 10.8.2 ]

Affected platforms

  • [ X ] linux

Browsersync use-case

  • [ X ] Gulp

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

(As in step 1 above)

** It caught my attention that the TypeScript files of the configuration settings seem to differ slightly from the public documentation in that there is scriptPaths instead of scriptPath, and possibly changes for middleware too...

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