perf: import mockXHR only in production
This commit is contained in:
parent
bc94111867
commit
d4c29f903f
|
@ -21,10 +21,10 @@ import '@/permission' // permission control
|
||||||
* you can execute: mockXHR()
|
* you can execute: mockXHR()
|
||||||
*
|
*
|
||||||
* Currently MockJs will be used in the production environment,
|
* Currently MockJs will be used in the production environment,
|
||||||
* please remove it before going online! ! !
|
* please remove it before going online ! ! !
|
||||||
*/
|
*/
|
||||||
import { mockXHR } from '../mock'
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
if (process.env.NODE_ENV === 'production') {
|
||||||
|
const { mockXHR } = require('../mock')
|
||||||
mockXHR()
|
mockXHR()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue