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

DEFECT: scriptPath non-functional #2090

Open
enspritz opened this issue Sep 29, 2024 · 0 comments
Open

DEFECT: scriptPath non-functional #2090

enspritz opened this issue Sep 29, 2024 · 0 comments

Comments

@enspritz
Copy link

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...

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

1 participant