A boilerplate for vue-webpack-project run with koa-grace, setup with Multiple entry.
Compatibility Note:
- In this branch
[email protected] supported 🚀
- 1.x Please see the version [email protected]
This boilerplate should run with Koa-grace.
Koa-grace is a new generation Nodejs SFB(Separation of Front and Back ends)
framework.
Make sure you have read it!
- Multiple entry.
- Code linting: ESlint.
- Inject component libraries at the same time. (PR is welcome)
- Upgrade Webpack to version 3.
- History API example. commit🚀
- Async-loading Combining Vue's async component feature and webpack's code splitting feature.
- Vuex todomvc example with vuex. commit🚀
- Hot reload.
cd ~/fe/app/
git clone [email protected]:Thunf/grace-vue-webpack-boilerplate.git
cd grace-vue-webpack-boilerplate
yarn
// or: npm install
npm run dev
~/fe/app/
is applications' src folder in koa-grace project, see folder structure - 目录结构
npm run new
> ?type: // select a mode
> init both controller & vue
init controller only
init vue files only
> ?name: // get column name
npm run build
-
npm run dev
- Webpack +
vue-loader
for single file Vue components. - State preserving compilation error overlay
- Source maps
- Webpack +
-
npm run build
: Production ready build.- JavaScript minified with UglifyJS.
- Static files copy with copy-webpack-plugin.
- All static assets compiled with version hashes for efficient long-term caching, and a production
index.html
is auto-generated with template to these generated assets.
This boilerplate is made from vuejs-templates/vue-webpack-boilerplate.
For detailed explanation & more functions, checkout the guide and docs for vue-loader.
You can fork this repo to create your own boilerplate, and run it on koa-grace