PHP Vue Loader

November 21, 2020

While working on a side project recently I desired to develop mini Vue.js applications within the confines of WordPress. While the documentation for Vue.js does explain how to go about using their library in projects without Webpack, I desired to get as close to that experience as possible and thus became the PHP Vue Loader repository. This project combines the best features of developing in *.vue files while avoiding the need to setup Webpack.

Code can be for the most part written just as you would in *.vue files with a few caveats. Most non-standard shorthand HTML attributes will not work like @click or #my-slot and would need to be written as v-on:click and v-slot:my-slot respectively. The joys of scoped styles also work along with support for deep selectors just as the docs describe! Also keep in mind that without Babel, the javascript code within the scripts will run directly in the browser.