Closed Andarist closed 3 years ago
I don't remember what the reason was. I pushed on top of your PR to just always append to the end of <head>
.
Aaaaawesome! ❤️ Is there anything needed to get those changes in Monaco or is the whole process automated and it will get in in one of the upcoming releases?
We are using Next.js with Monaco editor and I've noticed Monaco's styles disappearing.
TLDR is that
next/head
is using a little bit quirky~ diffing logic to update<head/>
during the client's runtime. Injecting any element in the middle of the elements managed by Next is a risk of weird side-effectsI think there is a potential of improving this in Next and I will probably file an issue there as well but I was wondering if maybe this is something that could be fixed here. Or at least, by raising an issue here, I would satisfy my personal curiosity about those liens of code. I don't exactly see why links would be injected before the last existing link. Is there any particular reason behind this? Could this be changed to just appending to the end of the head? I would be happy to provide a PR for this.
I've been searching for an answer in the git's history but this code is already in the initial commit of this repository.