vue-cli-plugin-ftl-render
v1.0.3
Published
vue cli ftl render plugin
Downloads
9
Readme
vue-cli-plugin-ftl-render
ftl render for vue cli plugin, use webpack-serve、fast-ftl and koa-proxies.
Support
- start a dev server
- render ftl file
- proxy request
Install
vue add ftl-render
Usage
// package.json
{
"scripts": {
"serve": "vue-cli-service serve:ftl"
}
}
// vue.config.js
module.exports = {
pluginOptions: {
ftlRender: {
ftlOption: {
root: path.resolve(__dirname, 'dist/pages'),
paths: [
path.resolve(__dirname, 'node_modules/@kaola/mobileweb-ftl')
]
},
serverOption: {
port,
devMiddleware: {
writeToDisk: true
}
},
proxyOption: {
'/api': {
target: 'http:localhost:8080/api.json'
}
}
}
}
}
Options
serverOption
see webpack-serve option
ftlOption
see fast-ftl option
proxyOption
see koa-proxies option