4 ms·
This feels like RequireJS all over again... But for srs, couldn't I achieve more or less the same effect by not putting node_modules in my .gitignore and then
by plausibilities 8y ago
This feels like RequireJS all over again...
But for srs, couldn't I achieve more or less the same effect by not putting node_modules in my .gitignore and then making aforementioned modules accessible via static content dir pathing?
- bengotow 8y agoYeah that’s the general idea - except that in this case, re-use of the same public URLs means browsers can cache the dependencies. (So we finally won’t have to download 400kb of the same React library code on site we visit!)
- s_y_n_t_a_x 8y agoYeah that was always a "benefit" of using a CDN for jQuery except it never really works out in practice when there's so many versions and then you're at the disposal of a public CDN, which can be the bottleneck, especially when it's critical code. Sure you can fallback to local copies, but that just means your app hung there for X amount of time, and the added complexity of adding fallback logic.
- chrisweekly 8y agosrs -> SSR (server-side rendering), just a typo, right? Anyway, committing -- and directly serving -- all of a given project's transitive dependencies sounds like a tough sell; without decent tooling to dedup and tree-shake, it might go from inefficient to implausible.
- plausibilities 8y agosrs = serious my bad