{"size": 780, "ext": "js", "max_stars_repo_path": "vue3/vue.config.js", "max_stars_repo_name": "lbc19920615/qiankun-template", "max_stars_repo_stars_event_min_datetime": "2021-08-13T08:46:18.000Z", "max_stars_repo_stars_event_max_datetime": "2021-08-13T08:46:18.000Z", "max_issues_repo_path": "vue3/vue.config.js", "max_issues_repo_name": "Mz1006/generator-qiankun-child-vue", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "vue3/vue.config.js", "max_forks_repo_name": "Mz1006/generator-qiankun-child-vue", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.5, "max_line_length": 52, "alphanum_fraction": 0.5846153846}
const path = require('path')
const { name } = require('./package')

function resolve (dir) {
  return path.join(__dirname, dir)
}

module.exports = {
  filenameHashing: true,
  lintOnSave: process.env.NODE_ENV !== 'production',
  runtimeCompiler: true,
  productionSourceMap: false,
  devServer: {
    hot: true,
    disableHostCheck: true,
    port: 9002,
    overlay: {
      warnings: false,
      errors: true
    },
    headers: {
      'Access-Control-Allow-Origin': '*'
    }
  },
  // 自定义webpack配置
  configureWebpack: {
    resolve: {
      alias: {
        '@': resolve('src')
      }
    },
    // 让主应用能正确识别微应用暴露出来的一些信息
    output: {
      library: `${name}-[name]`,
      libraryTarget: 'umd', // 把子应用打包成 umd 库格式
      jsonpFunction: `webpackJsonp_${name}`
    }
  }
}
