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
Start BrowserSync with the following configuration:
Load an otherwise properly-functioning page in the browser without caching.
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.
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...
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 byscriptPath
.Steps to reproduce/test case
http://localhost:8080/abc/browser-sync/browser-sync-client.js?v=3.0.3
, but BrowserSync responded with 404.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
Affected platforms
Browsersync use-case
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 ofscriptPath
, and possibly changes formiddleware
too...