I'm using laravel-mix-criticalcss npm package to get the critical css of my site.
Under the hood it uses Penthouse and you can set Penthouse setting in your webpack.mix.js in the critical options.
Penthouse docs docs state:
Generally you have to ensure that all elements you want styled in the critical css appears (visible) in the HTML of your page (with Javascript disabled)
This is not going to be possible on our site. I know you can give some Puppeteer settings in the penthouse settings. Is there a way to make it so JavaScript will be enabled?
There's a
blockJSRequestsoption.