diff --git a/src/main.js b/src/main.js index ef07f3892fb..fb75857d37d 100644 --- a/src/main.js +++ b/src/main.js @@ -25,11 +25,12 @@ import * as filters from './filters' // global filters * you can execute: mockXHR() * * 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') { - mockXHR() + import('../mock').then(({ mockXHR }) => { + mockXHR() + }) } Vue.use(Element, {