{"size": 1912, "ext": "js", "max_stars_repo_path": "build/webpack.dev.config.js", "max_stars_repo_name": "muermaru/simple-webpack-multiple-pages-template", "max_stars_repo_stars_event_min_datetime": "2018-03-19T06:53:09.000Z", "max_stars_repo_stars_event_max_datetime": "2020-12-15T03:22:46.000Z", "max_issues_repo_path": "build/webpack.dev.config.js", "max_issues_repo_name": "muermaru/simple-webpack-multiple-pages-temple", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "build/webpack.dev.config.js", "max_forks_repo_name": "muermaru/simple-webpack-multiple-pages-temple", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.7113402062, "max_line_length": 58, "alphanum_fraction": 0.4565899582}
'use strict'
const path = require('path')
const webpack = require('webpack')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.config')

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

const devWebpackConfig = merge(baseWebpackConfig, {
  devtool: 'eval-source-map',
  devServer: {
    contentBase: path.resolve(__dirname, '../dist'),
    clientLogLevel: 'warning',
    historyApiFallback: true,
    hot: true,
    host: '0.0.0.0',
    port: 8080,
    open: false,
    overlay: {
      warnings: false,
      errors: true,
    },
    watchContentBase: false,
    publicPath: '/',
    // quiet: true, // necessary for FriendlyErrorsPlugin
  },
  module: {
    rules: [
      {
        test: /\.css$/,
        include: /node_modules/,
        use: [
          {
            loader: 'style-loader',
          },
          {
            loader: 'css-loader'
          }
        ]
      },
      {
        test: /\.less$/,
        include: /node_modules/,
        use: [
          {
            loader: 'style-loader',
          },
          {
            loader: 'css-loader'
          },
          {
            loader: 'less-loader',
          }
        ]
      },
      {
        test: /\.css$/,
        include: [resolve('src')],
        use: [
          {
            loader: 'style-loader',
          },
          {
            loader: 'css-loader'
          }
        ]
      },
      {
        test: /\.less$/,
        include: [resolve('src')],
        use: [
          {
            loader: 'style-loader',
          },
          {
            loader: 'css-loader'
          },
          {
            loader: 'less-loader',
          }
        ]
      }
    ]
  },
  plugins: [
    new webpack.HotModuleReplacementPlugin(),

    new webpack.NamedModulesPlugin(),

    new webpack.NoEmitOnErrorsPlugin()
  ]
})

module.exports = devWebpackConfig
