How to load plugin static data from cloudfront

There are already plugins to do the rewrites. For example, CDN Linker. By default, it loads / rewrites the static content for ‘wp-includes’ and ‘wp-content’. You may change this default behaviour after the installation / activation or fork it to let this plugin rewrite only the data from the plugins directory.