code: function setBrowserEnv() {
    env = 'browser'
    fs = {
      readFileSync(filePath) {
        const fileMap = window.__FILE_MAP__ || {}
        return fileMap[filePath] || null
      }
    }
    window.require = runJs = filePath => {
      const content = fs.readFileSync(filePath + '.js')
      if (content) {
        // eslint-disable-next-line no-new-func
        const func = new Function('require', 'module', content)
        const mod = {exports: {}} // modules
  
        func.call(null, relativePath => {
          const realPath = path.join(path.dirname(filePath), relativePath)
          return window.require(realPath)
        }, mod)
  
        return mod.exports
      }
  
      return null
    }
  }
docs: 设置浏览器环境