I was under the impression that it would work and it did not.
I tried to restart yarn start. Ran yarn && yarn build. Nothing, no luck.
What is it that I’m missing?
EDIT: It might have something to to with adding a defer attribute to the script tags, but I’m not sure how to do that either. Any help would be greatly appreciated.
It would appear remove that first wp_enqueue_script() would be part of removing jQuery (along with in webpack.mix.js and in app.js), but this is not correct. When removing that first function call it completely removes all JavaScript from the site. Why doesn’t app.js still load?
I’d appreciate any insight. I’m still fumbling around trying to get this to work.
My end goal is to completely remove jQuery from the frontend and enable Alpine.js
Ah, I see, so if I change [‘jquery’] to null (?) in the first call, it does work, but I still don’t really understand what is going on here. Where/what is vendor.js? Is that something I can learn about via the webpack or Laravel Mix docs?
Will I need to enqueue both vendor.js and app.js to get Alpine to load?