You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every once in a while we encounter a module that cannot even be loaded on the server because it has top-level references to browser-only objects such as document. This is the case when you try to use the Monaco editor in Fresh.
Basically it blows up just evaluating the module because it wants to look up DOM nodes at the module's top-level.
"Bad behaving" ES modules that refuse to even load on anything but the browser are a fact of life, and it would be nice if Fresh provided a way to specify a placeholder element for the initial render, but only load and run the code of the island on the client.
I don't know what this would look like, but it saves a lot of pain hand-rolling async imports.
The text was updated successfully, but these errors were encountered:
Every once in a while we encounter a module that cannot even be loaded on the server because it has top-level references to browser-only objects such as
document
. This is the case when you try to use the Monaco editor in Fresh.Basically it blows up just evaluating the module because it wants to look up DOM nodes at the module's top-level.
"Bad behaving" ES modules that refuse to even load on anything but the browser are a fact of life, and it would be nice if Fresh provided a way to specify a placeholder element for the initial render, but only load and run the code of the island on the client.
I don't know what this would look like, but it saves a lot of pain hand-rolling async imports.
The text was updated successfully, but these errors were encountered: