{"size": 944, "ext": "js", "max_stars_repo_path": "build/webpack.base.config.js", "max_stars_repo_name": "dengwb1991/owl-redux", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "build/webpack.base.config.js", "max_issues_repo_name": "dengwb1991/owl-redux", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "build/webpack.base.config.js", "max_forks_repo_name": "dengwb1991/owl-redux", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.9777777778, "max_line_length": 61, "alphanum_fraction": 0.5656779661}
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')

const resolve = (dir) => {
  return path.join(__dirname, '..', dir)
}

const createLintingRule = () => ({
  test: /\.(ts|tsx)$/,
  use: [{
    loader: 'ts-loader',
    options: {
      transpileOnly: true
    }
  }, {
    loader: 'eslint-loader',
    options: {
      formatter: require('eslint-friendly-formatter'),
      emitWarning: !config.dev.showEslintErrorsInOverlay
    }
  }],
  include: [resolve('src'), resolve('examples')],
  exclude: /node_modules/
})

module.exports = {
  resolve: {
    extensions: ['.js', '.ts', '.tsx'],
    alias: {
      'owl-redux': resolve('dist/owl-redux.js')
    }
  },
  module: {
    rules: [
      ...(config.dev.useEslint ? [createLintingRule()] : []),
      ...utils.styleLoaders({
        sourceMap: config.dev.cssSourceMap,
        usePostCSS: false
      })
    ]
  },
  plugins: []
}