Skip to content

Commit d634e2a

Browse files
committedJan 9, 2020
fix: fixed require mock bug in production
1 parent b57f200 commit d634e2a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎src/main.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ import * as filters from './filters' // global filters
2828
* please remove it before going online ! ! !
2929
*/
3030
if (process.env.NODE_ENV === 'production') {
31-
import('../mock').then(({ mockXHR }) => {
32-
mockXHR()
33-
})
31+
const { mockXHR } = require('../mock')
32+
mockXHR()
3433
}
3534

3635
Vue.use(Element, {

0 commit comments

Comments
 (0)
Please sign in to comment.