egg-view-vue
egg view plugin for [vue].
Install
$ npm i @hubcarl/egg-view-vue --save
Usage
// {app_root}/config/plugin.js
exports.vue = {
enable: true,
package: 'egg-view-vue',
};
// {app_root}/config/config.default.js
exports.vue = {
// cache: {
// max: 1000,
// maxAge: 1000 * 3600 * 24 * 7,
//},
};
Render in controller
// {app_root}/app/controller/test.js
exports.home = function* (ctx) {
yield ctx.render('home/home.js', { name: 'vue view' });
};
Configuration
see config/config.default.js for more detail.
Questions & Suggestions
Please open an issue here.