We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
1 parent 81db6b8 commit 6ae1d91Copy full SHA for 6ae1d91
src/main.js
@@ -24,10 +24,13 @@ import * as filters from './filters' // global filters
24
* you want to use MockJs for mock api
25
* you can execute: mockXHR()
26
*
27
+ * Currently MockJs will be used in the production environment,
28
+ * please remove it before going online ! ! !
29
*/
30
if (process.env.NODE_ENV === 'production') {
- const { mockXHR } = require('../mock').default
- mockXHR()
31
+ import('../mock').then(({ mockXHR }) => {
32
+ mockXHR()
33
+ })
34
}
35
36
Vue.use(Element, {
0 commit comments