1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-09-05 08:49:47 +08:00

Update mock-server.js

fix win7 win10 path
This commit is contained in:
dingangang 2019-04-18 12:32:42 +08:00 committed by GitHub
parent 806f960a80
commit 1e3deb4f3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ function registerRoutes(app) {
function unregisterRoutes() {
Object.keys(require.cache).forEach(i => {
if (i.includes('/mock')) {
if (i.includes('/mock') || i.includes('\\mock') || i.includes('./mock')) {
delete require.cache[require.resolve(i)]
}
})