* mockjs config
@@ -3,12 +3,9 @@ import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
const modules = import.meta.globEager('./**/*.ts')
const mockModules: any[] = []
-Object.keys(modules).forEach(key => {
- if (key.includes('/_')) {
- return
- }
- mockModules.push(...modules[key].default)
-})
+Object.keys(modules)
+ .filter(path => !path.includes('/_')) // Ignore files and directories starting with _
+ .forEach(key => mockModules.push(...modules[key].default))
/**
* Used in a production environment. Need to manually import all modules
