code: function readModelsFromPath (dir, relative, webpackContext) {
    if (!isNode()) {
      if (!webpackContext) {
        return []
      }
      if (webpackContext.keys && webpackContext.resolve) {
        return webpackContext.keys().map(m => {
          let model = webpackContext(m)
          if (model.__esModule) {
            model = model.default
          }
          return checkNS(model) ? model : {namespace: getNamespace(m, relative), ...model}
        })
      } else {
        warning(false, `'fileModels.webpackContext' is invalid.\n See https://webpack.js.org/guides/dependency-management/#context-module-api .`)
        return []
      }
    } else {
    // do nothing with empty path
      return dir ? readModels(dir, relative) : []
    }
  }
docs: This function read model files from specific path in your project (usually 'src/model' or 'src/models')
  Param 'relative' decides whether to use full path as namespace or just use the file name
  
  Example :
  We have a model in 'models/earth/person.js' and set `path : './models'`
  
  `relative : true`  =>  namespace is 'person'
  `relative : false`  =>  namespace is 'earth/person'
  
  If 'namespace' is defined in the model, we use 'namespace'
  
  And the native implement of this feature only works in Node environment.
  If you want to use this in the browser, use the webpackContext
  
  @param {String} dir  model files path
  @param {Boolean} relative  'namespace' should be relative or not, default false
  @param {Array} webpackContext webpack `require.context` result. See https://webpack.js.org/guides/dependency-management/#context-module-api