Skip to content

Commit

Permalink
fix: fixed require mock bug in production
Browse files Browse the repository at this point in the history
  • Loading branch information
PanJiaChen committed Jan 9, 2020
1 parent b57f200 commit d634e2a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down

0 comments on commit d634e2a

Please sign in to comment.