I can see that the Lighthouse CLI accepts a --blocked-url-patterns
argument, but I can’t find any definition of what constitutes a valid pattern, only that *
is supported.
Is *
literally the only supported pattern-ish character?
I can see that the Lighthouse CLI accepts a --blocked-url-patterns
argument, but I can’t find any definition of what constitutes a valid pattern, only that *
is supported.
Is *
literally the only supported pattern-ish character?
2
Answers
In this Google Lighthouse test file
blockedUrlPatterns
is an array of string with various patterns.I realise this is coming in a little (two years) late, but for anyone else who wants to pass block patterns using the CLI you need to pass each pattern as its own param:
This will create the array required by Lighthouse – which you can see in the report produced if you search for
blockedUrlPatterns