Closed chachi closed 7 years ago
What would that do? I mean, why not put the CDN URL in directly?
So you could serve assets locally during development and from CDN in prod without changing app code or having per asset conditionals.
How do you imagine it working? This library doesn't provide any functions that return a webjars URL. It's purely about hosting the assets.
Thinking out loud a bit here, I have some ideas:
(1) saves some bandwidth, but using the CDN directly saves a roundtrip to the server.
What do you mean by (2)?
(3) could perhaps be handled by a more generic library, perhaps based off URL templates.
(1) Yes, indeed. (2) I already don't like this idea. (3) Yes, I think you're right.
Sounds like this could be done better elsewhere. Thanks for the convo!
How would you feel about making
wrap-webjars
optionally serve from the jsDelivr CDN?