used-styles icon indicating copy to clipboard operation
used-styles copied to clipboard

Inline full files and exclude them from loading twice

Open wille opened this issue 4 years ago • 1 comments

Need ability to inline complete .css files and exclude those files from the extracted list of css files. so it's not loaded twice.

wille avatar Sep 15 '20 12:09 wille

Related: #14, #13

There is a way how to exclude certain files during the initialisation phase - discoverProjectStyles, just return false from filter

You might create two workers - one "without" files you want to inline completely, and another "without" normal files.

  • first one will exclude those files from the extracted list of css files
  • second provide ability to inline complete .css files

Keep in mind - used-styles might report which files has to be added(getUsedStyles), but not able to inline them by itself. Inlining work only for rules.

theKashey avatar Sep 15 '20 22:09 theKashey