jjb-api-loader

1.0.2 • Public • Published

1.webpack config

module.exports = {
  module: {
    rules: [
      {
        test: /\.api$/,
        include: [ srcPath ],
        use: 'jjb-api-loader'
      }
    ]
  }
}

2.file example

index.api

// Login
Login Post args https://api.xxx.com/login

3.usage

import { Login } from './index.api';
// call
Login({
  userName: 'xxx',
  password: 'xxx'
}).then(res => console.log(res))

Package Sidebar

Install

npm i jjb-api-loader

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

6.79 kB

Total Files

6

Last publish

Collaborators

  • xiwell