I'm using NPM to bundle bootstrap and several other scripts for a Wordpress theme.
By default, WordPress loads jquery, so I have excluded jquery from the bundle. In google dev tools can see that jquery is being loaded before my bundled JS file but I still get this error.
pgthrottle.min.js:2 Uncaught TypeError: Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.
What's the best way to resolve this issue?
Here's what in my functions.php
wp_register_script( 'pgthrottle-js', THEME_DIR . '/js/pgthrottle.min.js', 'jquery', '', true );
wp_enqueue_script( array('jquery', 'pgthrottle-js') );