This would be cool: a web proxy that you could put in front of an existing site and optimize various aspects without having to modify the source:
CSS could be processed with postcss and autoprefixer, concatenated, and minified.
JavaScript could be processed with autopolyfiller, concatenated, and minified.
HTML documents could be linted and reformatted, and external JS and CSS could be "bundled" by rewriting sequences of external references as a single URL that does the concatenation.
The only snag here would be to avoid bundling external scripts that are interspersed with inline ones, since that could cause problems with execution order (unless explicitly marked as async).
This could even do critical CSS with some magic under the hood.
Other programmatic HTML transformations (e.g. with postHTML) could add accessibility features to sites based on common selector patterns, and automatically include scripts that enable a11y behaviors.
This would be cool: a web proxy that you could put in front of an existing site and optimize various aspects without having to modify the source:
async
).