Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Improve Styles bundle size? (Angular)


Hi all,

Is there a way I can improve the styes.scss bundle size? using just the 8.2.1 skeleton project it is

styles.d5205ccd91fc897d.css | styles | 1.56 MB | 89.89 kB

This is already exceeding the recommended 2mb total build size when with the other chunks.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi Rob,

Thank you for reaching out. To address the issue of the styles.scss bundle size, you can consider optimizing your styles by removing unused components. You might find that most of style components are included by default, and you may not need all of them for your specific project.

You can start by reviewing removing styles from the following files:

/angular/demo1/src/assets/sass/core/vendors/plugins/_plugins.scss
/angular/demo1/src/assets/sass/core/components/components.scss

These files contain a variety of style components, and removing the ones not used in your project can reduce the overall bundle size. Ensure that you keep the styles necessary for your application to function.

After making these adjustments, rebuild your project, and you could see a reduction in the styles.scss bundle size.

If you have further questions, feel free to ask.

Thanks


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(