-
Notifications
You must be signed in to change notification settings - Fork 12k
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
ng serve with service worker #9869
Comments
This is just what I'm looking for.. of course we can use something like http-serve or alike but then we have configure our proxy in yet another location and different ways... |
Exactly, I like the hot reload capabilities of ng serve and would love the service workers to work with it. |
@filipesilva I know that the stated way of running SW on local is to use httpd and serve from /dist.. but we also have a proxy config setup so running from dist will show me the login bit that's it ;) Perhaps you have some recommendations? |
This feature is especially important when you want to test push notifications. |
This would be a handy feature, especially when creating new projects with PWA in mind. You want to know if it all works smoothly with push features. |
+1 Since one of the greatest features of PWA are Push Notifications, we'd love to be able to test all this with the comfort provided by the classic "ng serve" command ! |
Is there any one who has a solution for this when using ng serve? |
@StephenFluin (congratulations and all the best, btw—have a nice vacation) @webmaxru @alxhub: following-up this discussion from https://twitter.com/christianliebel/status/1050789670412521472 @SteffenJahr and I held a couple of workshops at AngularConnect, Angular Days, WDC and other conferences. The fact that service worker generation is not enabled when using One of the crucial downsides when using Proposal:
What do you think? Is this something PR-worthy? |
ng serve --prod --generateSW=config.js this is how i do it I'm force to use http-server to serve the files. |
@christianliebel hi, i type |
@cnscorpions This is my proposal, and it’s not implemented yet. |
I think this is an important feature for developers. Is there any schedule as to when this will be implemented? |
100% agree this is vital to a healthy dev workflow. It's been a year since this has been open, and it's should be considered more urgently. |
OMG just do it already!!! |
Yes please |
please please |
May 2020 and still open. |
June 2020 and still open. |
https://blog.donbowman.ca/2020/06/29/using-ng-serve-with-angular-service-workers/ this workaround works for me, YMMV. |
Tried to update PWA configuration yesterday using Not sure why I seemed being able to do that earlier that day but then hours later I got here... And yes, this feature would make a lot of sense. |
Would be great, shame its been this long with no implementation |
…ker when using dev-server With this change we add the ability for the dev-server to serve service workers when configured in the browser builder. Closes angular#9869
…ker when using dev-server With this change we add the ability for the dev-server to serve service workers when configured in the browser builder. Closes angular#9869
…ker when using dev-server With this change we add the ability for the dev-server to serve service workers when configured in the browser builder. Closes angular#9869
…ker when using dev-server With this change we add the ability for the dev-server to serve service workers when configured in the browser builder. Closes #9869
I'm really excited about that commit pushed by @dgp1130 and @alan-agius4 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
As a user, I would like to be able to test my service worker generation / scripts.
I can do this today with ng build --prod, but then I have to spin up my own server and manually rebuild each time. If I try running
ng build --prod
today, I get runtime errors because the service worker can't be found.If
ng build --prod
would generate a service worker, this would risk breaking developer expectations (due to normal Service Worker behavior), but it would better match what a developer might expect from debugging a "production" build of their application, even through the refresh cycle would be at the mercy of their service worker.The text was updated successfully, but these errors were encountered: