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

Browser sync script fails to load when an APP_BASE_HREF is used #1495

Closed
1 of 6 tasks
orestisioakeimidis opened this issue Feb 8, 2020 · 1 comment · Fixed by #1517
Closed
1 of 6 tasks

Browser sync script fails to load when an APP_BASE_HREF is used #1495

orestisioakeimidis opened this issue Feb 8, 2020 · 1 comment · Fixed by #1517

Comments

@orestisioakeimidis
Copy link

orestisioakeimidis commented Feb 8, 2020

🐞 Bug report

What modules are related to this issue?

  • aspnetcore-engine
  • builders
  • common
  • express-engine
  • hapi-engine
  • module-map-ngfactory-loader

Description

The browser sync script file fails to load when an APP_BASE_HREF is used. What is the rationale behind of removing the leading slash of the script path here? If I comment out this line, it works!

🔬Minimal Reproduction

Create a project with CLI, add SSR support and replace this server.get('*' in the server.ts file with server.use('/path'. You need to set the APP_BASE_HREF for the browser to the same value /path.

🌍Your Environment

Angular CLI: 9.0.1
Node: 12.13.0
OS: darwin x64

Angular: 9.0.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.1
@angular-devkit/build-angular     0.900.1
@angular-devkit/build-optimizer   0.900.1
@angular-devkit/build-webpack     0.900.1
@angular-devkit/core              9.0.1
@angular-devkit/schematics        9.0.1
@angular/cli                      9.0.1
@ngtools/webpack                  9.0.1
@nguniversal/builders             9.0.0
@nguniversal/common               9.0.0
@nguniversal/express-engine       9.0.0
@schematics/angular               9.0.1
@schematics/update                0.900.1
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2
alan-agius4 added a commit that referenced this issue Feb 19, 2020
…public host with a path name

We should only remove the leading slash of BrowserSync script when having a public host with a path name, this will other cause the browser sync script not to be found when using a base href.

Closes #1495
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants