Skip to content

Commit 2559891

Browse files
committed
fix: fixed require mock bug in production
1 parent a6bb84b commit 2559891

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
@@ -29,9 +29,8 @@ import * as filters from './filters' // global filters
2929
* please remove it before going online ! ! !
3030
*/
3131
if (process.env.NODE_ENV === 'production') {
32-
import('../mock').then(({ mockXHR }) => {
33-
mockXHR()
34-
})
32+
const { mockXHR } = require('../mock')
33+
mockXHR()
3534
}
3635

3736
Vue.use(Element, {

0 commit comments

Comments
 (0)