diff --git a/src/main.js b/src/main.js index ef07f3892fb092cec38890bfb34e6c2e67297629..fb75857d37d9824a603d2f81a3444487660f2c79 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, {