Skip to content

v4.4.4

Compare
Choose a tag to compare
@cossssmin cossssmin released this 30 Mar 15:32
· 319 commits to master since this release

Fixed

  • fixed an issue where selectors safelisted with removeUnusedCSS.whitelist were still being removed after they were inlined. To make sure that a selector that was inlined will not be removed from the HTML markup, you need to safelist it like this:

     // config.production.js
     module.exports = {
      // ...
       inlineCSS: true,
       removeUnusedCSS: {
         whitelist: ['.preserve-me'] // need the full CSS selector with leading dot etc., not just "preserve-me"
       },
     }
  • fixed an issue where removeInlinedSelectors could not be disabled.

    You may now choose to not remove from the HTML any CSS classes that were inlined:

     // config.production.js
     module.exports = {
      // ...
       inlineCSS: true,
       removeUnusedCSS: {
         removeInlinedSelectors: false,
       },
     }

    CSS will be inlined, but classes will not be removed from the elements or from <style>.


v4.4.3...v4.4.4