light-api-loader
v0.3.1
Published
remove debugApi
Downloads
6
Readme
light-api-loader
removing a debug api when packing the code in the production environment
Example
<!-- DevApi.js -->
export default {
a: 'trueExam.do?id=9dadc086-64a0-49a7-81b1-10d00ba82682',
b: 'trueExam.do?id=9dadc086-64a0-49a7-81b1-10d00ba82112',
}
↓ ↓ ↓ ↓
export default {}
Usage
Install
npm install light-api-loader
Config
add as webpack loader in webpack config file
{
test: /\.(js)$/,
loader: 'light-api-loader',
include: [resolve('src')],
options: {
fileName: 'DevApi' // defined dev api file name
}
}