0

When I serve the app for production using ng serve --prod, the compiled version (bundled CSS) does not include the CSS specific to component. I.e. when I look for the classes and definition provided in the styles.scss I was able to see it, but when I tried to find the classes and definitions specified in the scss file for component, they were not present in bundle css. There were no errors.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Amit Goel
  • 1
  • 1
  • 3
    Because your files are bundled, minified and encapsulated. Inspect your HTML elements directly to see their styles. –  Jun 12 '18 at 08:50
  • @trichetriche: Thanks for replying. I did inspect the elements. In case of normal ng serve when I inspect the span I see valid CSS in the style section(i.e. the definition of the classes is applied) but in ng serve --prod the class definition is not there. Would have posted images of inspection but I do not have enough points yet to do that. – Amit Goel Jun 12 '18 at 12:06

0 Answers0