{"size": 1581, "ext": "js", "max_stars_repo_path": "gui/vue.config.js", "max_stars_repo_name": "telekom/nuSIM-Loader-Application", "max_stars_repo_stars_event_min_datetime": "2021-02-26T14:54:05.000Z", "max_stars_repo_stars_event_max_datetime": "2021-07-02T04:14:06.000Z", "max_issues_repo_path": "gui/vue.config.js", "max_issues_repo_name": "telekom/nuSIM-Loader-Application", "max_issues_repo_issues_event_min_datetime": "2021-03-21T10:25:37.000Z", "max_issues_repo_issues_event_max_datetime": "2021-06-10T09:41:35.000Z", "max_forks_repo_path": "gui/vue.config.js", "max_forks_repo_name": "telekom/nuSIM-Loader-Application", "max_forks_repo_forks_event_min_datetime": "2021-04-22T10:20:55.000Z", "max_forks_repo_forks_event_max_datetime": "2021-04-22T10:20:55.000Z"}
{"max_stars_count": 6, "max_issues_count": 7, "max_forks_count": 1, "avg_line_length": 29.2777777778, "max_line_length": 68, "alphanum_fraction": 0.5857052498}
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
const appConfig = require('./src/app.config')

module.exports = {
  configureWebpack: {
    // We provide the app's title in Webpack's name field, so that
    // it can be accessed in index.html to inject the correct title.
    name: appConfig.title,
    // Set up all the aliases we use in our app.
    resolve: {
      alias: require('./aliases.config').webpack,
    },
    output: {
      filename: '[name]-[hash:7].js',
      chunkFilename: '[name]-[hash:7].js',
    },
    plugins: [
      // Optionally produce a bundle analysis
      new BundleAnalyzerPlugin({
        analyzerMode: process.env.ANALYZE ? 'static' : 'disabled',
        openAnalyzer: process.env.CI !== 'true',
      }),
    ],
  },
  baseUrl: '.',
  css: {
    // Enable CSS source maps.
    sourceMap: true,
  },

  chainWebpack: config => {
    if (config.plugins.has('extract-css')) {
      const extractCSSPlugin = config.plugin('extract-css')
      extractCSSPlugin &&
        extractCSSPlugin.tap(() => [
          {
            filename: '[name]-[hash:7].css',
            chunkFilename: '[name]-[hash:7].css',
          },
        ])
    }
  },

  // Configure Webpack's dev server.
  // https://github.com/vuejs/vue-cli/blob/dev/docs/cli-service.md
  devServer: {
    ...(process.env.API_BASE_URL
      ? // Proxy API endpoints to the production base URL.
        { proxy: { '/api': { target: process.env.API_BASE_URL } } }
      : // Proxy API endpoints a local mock API.
        { before: require('./tests/mock-api') }),
  },
}
