wodax-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.

Usage no npm install needed!

<script type="module">
  import wodaxUmiPluginDatahub from 'https://cdn.skypack.dev/wodax-umi-plugin-datahub';
</script>

README

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


sorrycc


xudafeng


tudou527

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

LICENSE

MIT