A simple Vue 2.0 Webpack &
vue-loadersetup for WorddPress
This template is Vue 2.0 compatible.
Forked from: https://github.com/shshaw/vue-webpack-wordpress
This is a project template for vue-cli.
$ npm install -g vue-cli
$ vue init caldera-learn/vue-webpack-wordpress-plugin my-project
$ cd my-project/vue
$ npm install
$ npm run build- Put
<div id="app"></div>somewhere -- admin page, the_content() whatever... - When developing use
npm run watchto watch changes and rebuild
- webpack_enqueue is an example of how to enqueue the built scripts.
- You should probably change constants and function prefixes.
- Josh will probably make a full boilerplate out of this at some point.
- Live reload doesn't work for Josh so he removed it.
For detailed explanation on how things work, consult the docs for vue-loader. Also check out the breaking changes in [email protected].
You can fork this repo to create your own boilerplate, and use it with vue-cli:
vue init username/repo my-project