jjb-api-loader
v1.0.2
Published
webpack api file loader
Downloads
3
Readme
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))