3 ms·
The only long term solution I've found that works is to minimize the need for 3rd party dependencies in the first place. I completely gave up on bundling and a
by bob1029 3y ago
The only long term solution I've found that works is to minimize the need for 3rd party dependencies in the first place.
I completely gave up on bundling and all forms of optimization beyond that. Turns out it doesn't matter as long as the total amount of source for your site is less than what twitter or Facebook use (it will be).
I recently had to take a dep on three.js and a few others items for a side project, and instead of reaching for one of the various toolchains, I grabbed the raw JS/module source and wrote my own import map by hand:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sc...
Note that you will need an ES module shim for iOS/Safari if you go this path: https://github.com/guybedford/es-module-shims https://github.com/guybedford/es-module-shims