File a bug in done-ssr about document.location. I didn’t know such a property exists. We already set window.location so we can do the same for document.location.
But it’s entirely possible that this module can’t be loaded by our virtual dom. if that’s the case you should turn it off in Node like so:
Ah, ok. This has nothing to do with steal. It has everything to do w/ the very simple DOM (can-simple-dom) we use to render our site. window.location.href exists, but not document.location.href.
There are three possible solutions:
Ask @matthewp on how you could swap to something like JSDom instead of can-simple-dom that might support what’s needed to load tinymce.
Add document.location.href to can-simple-dom (or find a plugin that can do that).
And it was able to load. However this is before trying to use it so it’s hard telling what is required when you want to start displaying stuff.
So I would probably go with the map to @empty method. Note that for this to work your app that actually imports the module should detect if it’s running in Node like:
import tinymce from "tinymce/tinymce";
import platform from "steal-platform";
if(platform.isNode) {
// tinymce is undefined
} else {
// Use tinymce
}