Building isomorphic #javascript packages
▻https://hackernoon.com/building-isomorphic-javascript-packages-1ba1c7e558c5?source=rss----3a814
Building Isomorphic JavaScript PackagesI had to look up isomorphic in a dictionary the first time I came across this word in web development. Wikipedia reports that Isomorphic JavaScript, also known as Universal JavaScript, describes JavaScript applications which run both on the client and the server.Building a package that works out of the box in both the server (ie Node) and the client (ie a browser) is hard. As soon as you start mixing in dependencies, if even one of them makes a call to a node-only package (think fs) or browser-only object (think window) , it will tank your whole build. Worse yet, you may not even be able to reasonably infer this problem exists, as they may be buried in sub-sub-sub-dependencies that have no bearing on the code you are writing.This document describes (...)
#universal-javascript #nodejs #typescript #isomorphic-javascript