I enabled CDN on our app, the bundle size was ~1.7MB so I thought that doing so would improve load times on mobile, but it doesn’t seem to make a big difference for users in same country as hosting provider.
Next step was to split code into chunks using dynamic imports. But these then get served from the app server via DDP. If you do this in webpack usng common chunks plugin etc, you get a bunch of static assets that can be served from a CDN.
The other advantage to this is once you enable code splitting, a lot of times the chunks won’t change. With a single bundle (the default in Meteor/webpack), any change to your code means new hash/bundle. With splitting, only some of them will change, and the rest can continue to live on the CDN, and be cached on user devices, meaning faster downloads.
Same thing applies to using 3rd party libs - its better to load them from external cdn so they are cached and don’t have to be updated.
At least that’s my thinking. I know there’s only so much that can be done.