Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
perf: refine
  • Loading branch information
PanJiaChen committed Jan 6, 2020
commit 6ae1d91c9d3bc01d111e6832b68d1848a2738334
7 changes: 5 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ import * as filters from './filters' // global filters
* you want to use MockJs for mock api
* you can execute: mockXHR()
*
* Currently MockJs will be used in the production environment,
* please remove it before going online ! ! !
*/
if (process.env.NODE_ENV === 'production') {
const { mockXHR } = require('../mock').default
mockXHR()
import('../mock').then(({ mockXHR }) => {
mockXHR()
})
}

Vue.use(Element, {
Expand Down