removing a debug api when packing the code in the production environment
<!-- DevApi.js -->
export default {
a: 'trueExam.do?id=9dadc086-64a0-49a7-81b1-10d00ba82682',
b: 'trueExam.do?id=9dadc086-64a0-49a7-81b1-10d00ba82112',
}
↓ ↓ ↓ ↓
export default {}
npm install light-api-loader
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
}
}