This plugin is meant to provide all @midwayjs/faas-dev-pack options to vue-cli.
yarn add vue-cli-plugin-faas
# OR npm install vue-cli-plugin-faas
// vue.config.js
module.exports = {
pluginOptions: {
faas: {
// ...
}
}
}
See midway faas dev pack for options
object to pass to the plugin.
- default value, you can overwrite it.
// vue.config.js
module.exports = {
pluginOptions: {
faas: {
sourceDir: 'src/apis',
// ignore function name
ignoreWildcardFunctions: ['render'],
// ignore pattern
ignorePattern: (req) => {
const { pathname } = URL.parse(req.url);
return /\.(js|css|map|json|png|jpg|jpeg|gif|svg|eot|woff2|ttf)$/.test(pathname);
}
}
}
}
Vue CLI Plugin FaaS is licensed under MIT License.