anthonygore / html-critical-webpack-plugin

A webpack plugin that will extract critical CSS. Now supports Webpack v4.
MIT License
446 stars 38 forks source link

Inlined styles do not pass hosting's sanitizer, need ability to add style link manually #46

Open alexey-m-ysbm opened 4 years ago

alexey-m-ysbm commented 4 years ago

Locally all works but when app is deployed hosting's sanitizer changes style link: <link rel="preload" as="style" onload="this.onload=null;this.rel=\" stylesheet\''="" href="/assets/css/app.123.css"> and we get an error. How to add link synchronously without "preload" ?

thescientist13 commented 4 years ago

Hi @alexey-m-ysbm

It's a little hard to understand your issue without seeing any code or in particular, the error message. But just know that all this plugin does is use the actual tool [critical**](https://github.com/addyosmani/critical) itself under the hood, so it may be worth reviewing it and understanding the options and outputs that it support.