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
1 changed files with 1 additions and 1 deletions

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)]
}
})