-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Use new demo page #306
Use new demo page #306
Conversation
// but some still fail. | ||
// So we have to reload the page to reapply the header. | ||
// Another reason is that SPA cannot control the header for each page. | ||
window.location.reload(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the page header state and force a reload and refresh the header if there is a problem with the image url. It's not the best way, but it seems to solve the problem of cross-origin image loading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps if we could separate the demo page from the SPA, we wouldn't need this workaround.
Do you know how to do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This issue facebook/docusaurus#3309 may be related, but I cannot find a solution... 😓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As another solution, proxying each external resource via netlify might solve the CORS issue, but that might complicate the configuration.
https://docs.netlify.com/routing/redirects/rewrites-proxies/#proxy-to-another-service
Please let me know your thoughts on how to solve the problems related to cross-origin. Problem details: https://developer.mozilla.org/en-US/docs/Web/API/crossOriginIsolated For example, trying to get
We get the same error with the API below. https://github.com/stylelint/stylelint/workflows/Testing/badge.svg
|
Solution 5: |
@ota-meshi Thanks a lot for summarizing! I think "Solution 2" is the easiest way for now. I don't feel UX is degraded on the preview. |
I agree. Preview LGTM. |
Thank you for your opinion! All we have to do is change the |
src/pages/demo.js
Outdated
return; | ||
} | ||
|
||
const FRAME_ORIGIN = 'https://deploy-preview-352--chimerical-trifle-8d3c21.netlify.app'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably need to change here:
const FRAME_ORIGIN = 'https://deploy-preview-352--chimerical-trifle-8d3c21.netlify.app'; | |
const FRAME_ORIGIN = 'https://chimerical-trifle-8d3c21.netlify.app'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work! 👏🏼
🎉 @ota-meshi Thanks again for all your fantastic work on the demo! |
None.
See stylelint/stylelint-demo#351
Still WIP. This uses the page URL which is still in development.