1.0.2 • Published 5 years ago

wodax-umi-plugin-datahub v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

umi-plugin-datahub

umi plugin for integrating macaca-datahub, which is a GUI-style mock tool that can be used to replace umi's built-in mock solution.

Setup

Install it via npm or yarn,

$ npm i umi-plugin-datahub -D

Configure and import this plugin in .umirc.js,

export default {
  plugins: [
    'umi-plugin-datahub',
  ],
};

Options

We can specify options for macaca-datahub, such as proxy and store.

export default {
  plugins: [
    ['umi-plugin-datahub', {
      proxy: {
        '^/api': {
          hub: 'hubname',
        },
      },
      store: path.join(__dirname, 'data'),
    }],
  ],
};

Checkout macaca-datahub for more options.

Example

Contributors

sorryccxudafengtudou527

This project follows the git-contributor spec, auto updated at Fri Apr 05 2019 17:28:24 GMT+0800.

LICENSE

MIT