How to Reduce CSS/JS Bundle Size By Removing Unused Resources Using Gulp

Hi,Metronic's by default includes all its available resources within the gulp config so the bundle size of the compiled CSS/JS files. To reduce the file size of the CSS/JS bundle files follow the below steps:

  1. Open theme/tools/gulp.config.js and refer to base->global->src config node. The mandatory contains of the core resource that are required for the Metronic's base functionalty while the optional node lists the optional resource that can be excluded according to a project requirements.
  2. Under optional node remove any resource by referring to a plugins documentation
  3. Recompile the assets using the Gulp builder

Text formatting options
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (0)