Suggestion: Enqueue extra “plugin” libraries individually
-
Hi Virtue authors-
Thanks for your work on this plugin.
I’d like to offer a suggestion on the way you are enqueueing JS files. There’s an all-in-one “plugins” file that you are enqueueing in
scripts.php, line 30:
wp_enqueue_script('virtue_plugins', get_template_directory_uri() . '/assets/js/min/plugins-min.js', array( 'jquery', 'masonry' ), '311', true);Because that file contains Bootstrap 3.0.3 (in its entirety?) it’s causing conflicts with other plugins that also rely on Bootstrap’s JS functionality. However, because it has been manually bundled with other libraries, dequeueing the “plugins” script is going to probably break other things.
My request is that instead of manually bundling those libraries, just enqueue them individually, (maybe use the Bootstrap CDN for that one), so that developers can target the script we’d like to remove or modify. Sure, it’ll be a couple more HTTP requests, but, if enqueued individually, then optimization-loving devs can use whatever tools they want to bundle and optimize HTTP requests.
Thanks!
-David
The topic ‘Suggestion: Enqueue extra “plugin” libraries individually’ is closed to new replies.
