Closed nathraQ closed 1 year ago
I'm using the latest version of grunt-criticalcss.
I found some weird behaviour with the forceInclude. I had to include a css selector with the cli of criticacss it looked like this:
node_modules/criticalcss/bin/critical.js -u https://domain.com -o foo.css -f bar.css --force [.someSelector]
so I guessed that my grunt config should look like this
options: { forceInclude: ['.someSelector'], url: 'https://domain.com', filename: 'bar.css', outputfile: 'foo.css' }
But after debugging criticalcss used with grunt and CLI I figured out that to get the wanted behaviour (including .someSelector) I had to write the grunt config like this:
options: { forceInclude: ['[.someSelector]'], url: 'https://domain.com', filename: 'bar.css', outputfile: 'foo.css' }
I'm using the latest version of grunt-criticalcss.
I found some weird behaviour with the forceInclude. I had to include a css selector with the cli of criticacss it looked like this:
so I guessed that my grunt config should look like this
But after debugging criticalcss used with grunt and CLI I figured out that to get the wanted behaviour (including .someSelector) I had to write the grunt config like this: