3 ms·
Yeah. Can I put a file that imports all the modules at the top of the tree and load them before the browser has to parse anything else, to pre-cache? I haven't
by foobarbecue 4y ago
Yeah. Can I put a file that imports all the modules at the top of the tree and load them before the browser has to parse anything else, to pre-cache? I haven't tried this yet.
- jakelazaroff 4y agoIn theory, but "no bundle step" becomes a much less attractive pitch once you have to start manually maintaining something like that. IMO the advantage of ES module support in browsers is not needing to bundle in development (although with native bundlers like esbuild this is less of an issue) and for deploying small apps where the tree is shallow. If and when your codebase starts growing, you should use a bundler.
- foobarbecue 4y agoThanks, this is helpful advice. Not having to bundle in development is what I really want. In production I could see it as a necessary evil for the moment.