Re:Size of node_modules folder when installing the top 100 p...
by bazza451 on Friday January 10, 2020 @02:20AM
(#22009013)
Do hate this about javascript. one of the main reasons on the web side (apart from js not having a good STL) however is enterprises are still locked in to IE11 which requires all these tranpilers/bundlers to use modern syntax which usually are the heaviest of all of these dependencies.
[ Parent
| on HN ]
Re:Size of node_modules folder when installing the top 100 p...
by chispamed on Friday January 10, 2020 @03:20AM
(#22009346)
Vue-cli at least has a very neat feature; if you build with the —-modern flag it will create two versions of your scripts, one with modern syntax, smaller and faster for modern browsers and another legacy version for older browsers you have to support. It then uses the nomodule html attribute to automatically load the version your browser needs. This also has the nice effect of saving you bandwidth costs.