Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set "as" attribute on stylesheet link tag #3547

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

iainbeeston
Copy link
Contributor

@iainbeeston iainbeeston commented Dec 20, 2024

Description

In the browser javascript console I see this error on every page load:

The resource http://localhost:3000/avo-assets/avo.base.css was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally."

It's not causing me any issues as such - it's just noisy and can make it harder to see real issues. It seems like a simple thing to fix so I've raised a PR.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Screenshots & recording

Manual review steps

  1. The avo dashboard should load with the correct styles and show no stylesheet warning in the browser console.

Manual reviewer: please leave a comment with output from the test if that's the case.

Fix the following error:

    The resource http://localhost:3000/avo-assets/avo.base.css was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally."
@iainbeeston iainbeeston changed the title Set "as" attribute to stylesheet link tag Set "as" attribute on stylesheet link tag Dec 20, 2024
Copy link

codeclimate bot commented Dec 20, 2024

Code Climate has analyzed commit b88403a and detected 0 issues on this pull request.

View more on Code Climate.

@adrianthedev
Copy link
Collaborator

I didn't know about the as attribute

@adrianthedev adrianthedev merged commit e4aa5e5 into avo-hq:main Dec 20, 2024
21 checks passed
@Paul-Bob Paul-Bob added the Fix label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants