3 ms·
When the "right way" is harder than the "wrong way", you are guaranteed to get things done the "wrong way". CDNs are used, because not using CDNs is made unnec
by jampekka 2y ago
When the "right way" is harder than the "wrong way", you are guaranteed to get things done the "wrong way".
CDNs are used, because not using CDNs is made unnecessarily hard.
Want a local version locked copy? Select one of the dozen mutually incompatible package managers. Then select one of the dozen buggy and slow mutually incompatibile build systems. Then rewrite your app for CJS or ESM depending on the library, because ESM was made purposefully incompatible.
Want to use a CDN? Copy and paste this one line in your HTML.
- aembleton 2y agoCan't you just download the js file and save it next to your html files and then link to it from your html?
- jampekka 2y agoFor many assets yes, and it's something I do quite regularly. But many assets (especially CSS) rely on relative files - and we have apparently collectively decided that directories or other bunches or files is somehow a totally different thing than a file and need fundamentaly different logic - so just using the CDN makes you not have to worry about this.
- rawbot 2y agoYes, of course. I think he means all the to manage a big project's dependencies. For a small or static website, you could manage all of those manually.