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

Link attributes are wiped in index.html #698

Closed
johanrd opened this issue Feb 24, 2021 · 2 comments
Closed

Link attributes are wiped in index.html #698

johanrd opened this issue Feb 24, 2021 · 2 comments

Comments

@johanrd
Copy link
Contributor

johanrd commented Feb 24, 2021

  1. Add some attributes to a link tag in index.html:
-<link integrity="" rel="stylesheet" href="{{rootURL}}assets/app.css">
+<link integrity="" rel="stylesheet" href="{{rootURL}}assets/app.css" media="none" onload="if(media!='all')media='all'">
  1. Build with embroider, and experience that the attributes are wiped in dist/index.html:
<link integrity="" rel="stylesheet" href="/assets/app.css">

This may not be very important in itself, but posting here since this is the third time (#562, #654) I have struggled with the developer ergonomics of how index.html is generated with embroider. Do we know of any workaround for now? Thanks!

@ef4
Copy link
Contributor

ef4 commented Feb 24, 2021

There is also an open PR: #588

It has been marked "draft" so hasn't been reviewed. I think it has more in it than necessary, but the fix is in there.

@johanrd
Copy link
Contributor Author

johanrd commented Feb 24, 2021

Ah, ok, thanks:thumbsup:

@johanrd johanrd closed this as completed Feb 24, 2021
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

No branches or pull requests

2 participants