perf: import mockXHR only in production

This commit is contained in:
花裤衩 2020-01-09 20:39:42 +08:00
parent bc94111867
commit d4c29f903f
1 changed files with 2 additions and 2 deletions

View File

@ -23,8 +23,8 @@ import '@/permission' // permission control
* Currently MockJs will be used in the production environment,
* please remove it before going online ! ! !
*/
import { mockXHR } from '../mock'
if (process.env.NODE_ENV === 'production') {
const { mockXHR } = require('../mock')
mockXHR()
}