mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-09-02 05:59:48 +08:00
自动排除mock
生产环境,使用webpack的条件编译自动排除mock数据
This commit is contained in:
parent
4f563a7bfe
commit
81db6b876f
@ -24,11 +24,9 @@ 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! ! !
|
||||
*/
|
||||
import { mockXHR } from '../mock'
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
const { mockXHR } = require('../mock').default
|
||||
mockXHR()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user