makes components work in both node and the browser