Hey @pYr0x, the issue is that our virtual DOM only loads as a dependency of jQuery. Since you are not importing jQuery the vdom is not loading and you are getting that error. This is a bug, I’ve filed an issue here: https://github.com/donejs/done-ssr/issues/177
In the meantime here’s a Hello Word that works:
var $ = require('jquery');
module.exports = function(){
$(document.body).append($('<div>').text('Hello world'));
};
Yeah you don’t really need jQuery, you just need vdom. What happens in a typical donejs app is you are depending on can which depends on jquery which we shimmed to depend on vdom. If you’re not using these things then vdom is never being imported and you get your error. Still working on making this possible, in the meantime either approach will likely work.
Yes, jsdom is the best by far, but it currently doesn’t work in done-ssr. I can’t recall the reason, I think it is because we have a hard dependency on can/util/vdom/vdom and some things use that as the document.