/* eslint import/no-extraneous-dependencies: 0 */
const path = require('path');
const merge = require('webpack-merge');
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
const baseConfig = require('./webpack.base.config');

// many of the webpack directives need an absolute path
const basedir = path.resolve(__dirname, '../');

const devConfig = {
  // tells Webpack to do some stuff, including setting NODE_ENV
  mode: 'development',
  // generate source maps to help debug in browser
  // devtool: 'source-map',
  // where to build dev files to for webpack-serve to work
  output: {
    path: path.resolve(basedir, 'build', 'public'),
    pathinfo: true,
    filename: '[name].[hash].js',
    chunkFilename: '[id].[hash].js',
    publicPath: 'http://localhost:2992/', // needed to get correct path in dev manifest file
  },
  plugins: [
    // add an intermediate caching step to speed up builds (expect the first one)
    new HardSourceWebpackPlugin(),
  ],
};

module.exports = merge.smart(baseConfig, devConfig);

/* eslint import/no-extraneous-dependencies: 0 */
const path = require('path');
const merge = require('webpack-merge');
// const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
const baseConfig = require('./webpack.base.config');

// many of the webpack directives need an absolute path
const basedir = path.resolve(__dirname, '../');

const devConfig = {
  // tells Webpack to do some stuff, including setting NODE_ENV
  mode: 'development',
  // generate source maps to help debug in browser
  // devtool: 'source-map',
  // where to build dev files to for webpack-serve to work
  output: {
    path: path.resolve(basedir, 'build', 'public'),
    pathinfo: true,
    filename: '[name].[hash].js',
    chunkFilename: '[id].[hash].js',
    publicPath: 'http://localhost:2992/', // needed to get correct path in dev manifest file
  },
  plugins: [
    // add an intermediate caching step to speed up builds (expect the first one)
    // new HardSourceWebpackPlugin(),
  ],
};

module.exports = merge.smart(baseConfig, devConfig);

Remove hardsource caching for build testing
Remove hardsource caching for build testing
