这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@jamesnw
Copy link
Contributor

@jamesnw jamesnw commented Oct 11, 2024

Description

If a <link> fails to load, we should recover gracefully. This may be because it's a 404 or because it's being loaded as CSS-in-JS for HMR. It possibly is due to a misconfigured server. Ideally we would confirm if it's actually CSS instead of just relying on mimetype, but there's not a good way of checking that.

Related Issue(s)

#255

Steps to test/reproduce

  • Load the demo in a polyfilled browser, see that fake.css fails to load initially.
  • Apply the polyfill.
  • See that the polyfill applies successfully
  • A console warning shows what the error is

Show me

https://deploy-preview-258--anchor-polyfill.netlify.app/

@netlify
Copy link

netlify bot commented Oct 11, 2024

Deploy Preview for anchor-polyfill ready!

Name Link
🔨 Latest commit a199f0f
🔍 Latest deploy log https://app.netlify.com/sites/anchor-polyfill/deploys/670d3a8c6bf4ee0008f8d3ca
😎 Deploy Preview https://deploy-preview-258--anchor-polyfill.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Oct 11, 2024

Deploy Preview for anchor-position-wpt canceled.

Name Link
🔨 Latest commit a199f0f
🔍 Latest deploy log https://app.netlify.com/sites/anchor-position-wpt/deploys/670d3a8c4be7390008527819

Co-authored-by: Jonny Gerig Meyer <jonny@oddbird.net>
@jamesnw jamesnw merged commit 919b7c4 into main Oct 14, 2024
12 checks passed
@jamesnw jamesnw deleted the non-css-link branch October 14, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Polyfill fails if a <link> fails to load or returns non-CSS content

3 participants