Cannot import discourse libs in markdown extensions

I think I get it: the markdown engine is also executed server-side (to generate the cooked version of the post). Hence the fact that I cannot rely on client-side libraries.