From 255989138daffed32e03d5a576b836d4fa748ad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?= Date: Thu, 9 Jan 2020 20:24:48 +0800 Subject: [PATCH] fix: fixed require mock bug in production --- src/main.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.js b/src/main.js index b00b3715..c34e3546 100644 --- a/src/main.js +++ b/src/main.js @@ -29,9 +29,8 @@ import * as filters from './filters' // global filters * please remove it before going online ! ! ! */ if (process.env.NODE_ENV === 'production') { - import('../mock').then(({ mockXHR }) => { - mockXHR() - }) + const { mockXHR } = require('../mock') + mockXHR() } Vue.use(Element, {