{"size": 2374, "ext": "js", "max_stars_repo_path": "src/helpers/document/webpack.config.js", "max_stars_repo_name": "skypager/skypager-next", "max_stars_repo_stars_event_min_datetime": "2016-09-30T07:00:31.000Z", "max_stars_repo_stars_event_max_datetime": "2019-09-04T16:25:13.000Z", "max_issues_repo_path": "src/helpers/document/webpack.config.js", "max_issues_repo_name": "skypager/skypager-next", "max_issues_repo_issues_event_min_datetime": "2017-12-13T06:27:00.000Z", "max_issues_repo_issues_event_max_datetime": "2019-07-16T18:04:56.000Z", "max_forks_repo_path": "src/helpers/document/webpack.config.js", "max_forks_repo_name": "skypager/skypager-next", "max_forks_repo_forks_event_min_datetime": "2018-12-12T19:58:27.000Z", "max_forks_repo_forks_event_max_datetime": "2021-02-02T09:10:34.000Z"}
{"max_stars_count": 31, "max_issues_count": 13, "max_forks_count": 7, "avg_line_length": 23.9797979798, "max_line_length": 83, "alphanum_fraction": 0.4831508003}
const merge = require('webpack-merge')
const cwd = __dirname
const path = require('path')

const webConfig = merge.strategy({ entry: 'replace' })(
  require('@skypager/webpack/config/webpack.config.prod'),
  {
    name: 'web',
    output: {
      libraryTarget: 'umd',
      library: 'SkypagerHelpersDocument',
    },
    module: {
      rules: [
        {
          test: /discover\.js$/,
          use: [
            {
              loader: 'skeleton-loader',
              options: {
                procedure() {
                  return `module.exports = { discover: () => {} }`
                },
              },
            },
          ],
        },
      ],
    },
    entry: {
      'skypager-helpers-document': path.resolve(cwd, 'src', 'index.web.js'),
    },
    externals: [
      {
        react: {
          commonjs2: 'react',
          commonjs: 'react',
          umd: 'react',
          var: 'global React',
        },
        'prop-types': {
          commonjs2: 'prop-types',
          commonjs: 'prop-types',
          umd: 'prop-types',
          var: 'global PropTypes',
        },
        '@skypager/runtime': {
          commonjs2: '@skypager/runtime',
          commonjs: '@skypager/runtime',
          umd: '@skypager/runtime',
          var: 'global skypager',
        },
      },
    ],
  }
)

const minifiedWebConfig = merge.strategy({ entry: 'replace' })(
  require('@skypager/webpack/config/webpack.config.prod'),
  {
    name: 'web',
    output: {
      libraryTarget: 'umd',
      library: 'SkypagerHelpersDocument',
    },
    externals: [
      {
        react: {
          commonjs2: 'react',
          commonjs: 'react',
          umd: 'react',
          var: 'global React',
        },
        'prop-types': {
          commonjs2: 'prop-types',
          commonjs: 'prop-types',
          umd: 'prop-types',
          var: 'global PropTypes',
        },
        '@skypager/runtime': {
          commonjs2: '@skypager/runtime',
          commonjs: '@skypager/runtime',
          umd: '@skypager/runtime',
          var: 'global skypager',
        },
      },
    ],
    entry: {
      'skypager-helpers-document.min': path.resolve(cwd, 'src', 'index.web.js'),
    },
  }
)

webConfig.plugins = webConfig.plugins.filter(
  p => !p.constructor || (p.constructor && p.constructor.name !== 'UglifyJsPlugin')
)

module.exports = webConfig
