I've written ES module which imports other modules and exports some stuff. Now I want to use the same module in Node. (share the same file)
Is there any universal way how to deal with differences e.g. "import" vs "require" and "export" vs "exports"? I want solution without browserify or webpack, just some hack to make it work in node and in browser too.
I can make the "export" part, I don't know if there is any hack to make the "import/require" part.