diff --git a/src/main.js b/src/main.js index e218bd83..b00b3715 100644 --- a/src/main.js +++ b/src/main.js @@ -26,11 +26,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, {