Open raray opened 11 months ago
Why are you generating Critical CSS from the nystudio107.com
website?
@khalwat I am trying to get any result that makes sense. As part of that effort, I tried multiple URLs including the one shown in the example docs.
I've tried multiple different criticalUrl values. I've even used the exact example config from the docs.
The URL you should be pulling the Critical CSS from is your website's URL.
Yes. I know. I've tried that. I always get the result above regardless of the URL I enter.
The current config is this:
PluginCritical({
criticalUrl: '[production url]',
criticalBase: 'craft/web/assets/dist',
criticalPages: [
{ uri: '', template: 'index' },
],
criticalConfig: {
user: '[production user]',
pass: '[production pass]',
strict: true,
},
}),
Remove the password protection from your site and try again without it in the config? I've never tried it with that in there, so I'm unsure if it will work.
I will try that, but I used multiple URLs that don't have passwords. Shouldn't I get a result from your website, or https://google.com
which I also tried?
Other URLs will not have CSS that matches yours, so you won't get any reasonable output
I removed the password. No change.
I'm highly confused by your responses. Does Critical compare the scraped CSS against something else to generate its results?
yes, it pulls the CSS from your Vite project
I see, thanks. That was a clue. I switched everything to the staging environment which is a closer match to what I'm working with and it does seem to be trying to build something more significant. So much that it times out. I set the Penthouse timeout up to 5 minutes and it still timed out.
Question
I am highly confused about the results I am seeing. I've tried multiple different
criticalUrl
values. I've even used the exact example config from the docs. No matter what I put in, I get this CSS generated:Additional context
I see the following logs: