manfredsteyer / ngx-build-plus

Extend the Angular CLI's default build behavior without ejecting, e. g. for Angular Elements
1.19k stars 136 forks source link

Bundled styles not applied for <body> or <html> tag #203

Open petef19 opened 4 years ago

petef19 commented 4 years ago

In my Ng test project, I use this command to bundle my styles into one .js file

ng build --single-bundle true --bundle-styles true --keep-styles true --prod --output-hashing=none

app.component.scss body { color: blue; background-color: yellow; }

the problem is that these styles are not applied.

Looking at the page source I see that the <body> and <html> tag do not get the _ng_content tag needed for the injected styles to work, hence the styles never get applied for these two tags...

is there a solution to this ?

pirminrehm commented 4 years ago

I wrote an answer on this in https://github.com/manfredsteyer/ngx-build-plus/issues/197#issuecomment-654073078

manfredsteyer commented 4 years ago

Thanks for this info. Seems like --keep-styles is broken. I'll fix it asap (during the course of the week)

manfredsteyer commented 4 years ago

Should work now. Can you pls try it with ngx-build-plus@latest