vue-cli-plugin-faas

1.0.1 • Public • Published

Vue CLI Plugin With Midway FaaS Development

This plugin is meant to provide all @midwayjs/faas-dev-pack options to vue-cli.

NPM Version NPM Downloads License

Installation

yarn add vue-cli-plugin-faas
# OR npm install vue-cli-plugin-faas

Usage

// vue.config.js
module.exports = {
  pluginOptions: {
    faas: {
      // ...
    }
  }
}

Options

See midway faas dev pack for options object to pass to the plugin.

Object examples

  • 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);
      }
    }
  }
}

License

Vue CLI Plugin FaaS is licensed under MIT License.

Package Sidebar

Install

npm i vue-cli-plugin-faas

Weekly Downloads

9

Version

1.0.1

License

MIT

Unpacked Size

4.69 kB

Total Files

5

Last publish

Collaborators

  • czy88840616
  • echosoar