[ Context ]
I’m currently working on a site that is very script heavy, loading over 45 scripts. My job is to widdle it down and boost performance. I’ve been given free reign and felt this would be good bedrock/sage project, implementing webpack and sass to minify scripts.
[ Question ]
I was wondering, is it possible/good practice to dequeue wordpress’s jquery and include it into the main.js bundle?
Looking around, I haven’t seen it done. Ideally I would like to include most of the sites scripts/css into bundle files, so jquery, jquery-migrate, jquery-ui, add-to-cart.js, js-cookie, etc would all be in dist/main.js and all/most of the site css/woo css into the dist/main.css.
I don’t really see a reason not too, but it also hasn’t been done before, which leads me to question whether it’s actually a good idea.