How to do chunked JS files in WordPress?


Webpack outputs chunks of JS files in order to parallelize downloads over HTTP/2 but unfortunately WP’s wp_enqueue_script requires that only one file be loaded to represent a script, forcing us to give up on the benefits of parallelization since we’re only serving a file at a given time.

Is there any way to redirect WP to all the files within a directory or with a certain name?

Daniel Simmons 2 months 0 Answers 11 views 0

Leave an answer