ganatan / angular-app

Angular 18 ,Bootstrap 5, Node.js, Express.js, CRUD, PWA, SSR, SEO, Lazy Loading, Examples Angular & React nrwl
647 stars 315 forks source link

Deployed app on heroku delay loaded css #5

Closed salahatwa closed 4 years ago

salahatwa commented 4 years ago

Dear gentle ,

i deployed your app on heroku but i see css delayed on load

kindly find deployed URL https://tyolk.herokuapp.com/

image

ganatan commented 4 years ago

@salahatwa

Hi, this type of error appears with an incorrect basehref.

For example with the repo

If I use the script ng build I serve the application like this https://your-domain.com

If I use the script ng build --base-href=/angular-example-starter/ I serve the application like this https://your-domain.com/angular-example-starter

With the repo

I have two scripts 1/ "build:ssr": "ng build --prod && ng run angular-starter:server:production", 2/ "build-demo:ssr": "ng build --prod --base-href=/angular-webapp/ && ng run angular-starter:server:production",

I serve the application like this 1/ https://angular.ganatan.com 2/ https://demo.ganatan.com/angular-webapp/

I don't know Heroku but you have to adapt your baseref

I hope it will help

salahatwa commented 4 years ago

Thanks alot for your support , you are very helpful

ganatan commented 4 years ago

My pleasure! Mi casa es su casa

And if you like you can star