fix: fixed require mock bug in production

This commit is contained in:
花裤衩 2020-01-09 20:24:48 +08:00
parent b57f2008bd
commit d634e2ae2f
1 changed files with 2 additions and 3 deletions

View File

@ -28,9 +28,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, {