text: const { resolve } = require('path')
  const webpack = require('webpack')
  const webpackMerge = require('webpack-merge')
  const HtmlWebpackPlugin = require('html-webpack-plugin')
  const commonConfig = require('./webpack.docs.base')
  
  // const publicPath = resolve(__dirname, '..', 'docs')
  
  module.exports = webpackMerge(commonConfig, {
    devtool: 'inline-source-map',
    entry: {
      docs: [
        'react-hot-loader/patch',
        'webpack-hot-middleware/client',
        './app/index.js',
      ],
    },
    module: {
      rules: [
        {
          test: /\.css$/,
          include: /node_modules/,
          use: ['style-loader', 'css-loader'],
        },
      ],
    },
    plugins: [
      new webpack.LoaderOptionsPlugin({
        minimize: false,
        debug: true,
      }),
      new HtmlWebpackPlugin({
        title: 'Documentation for PatternLibrary',
        cache: true,
        showErrors: true,
      }),
      new webpack.HotModuleReplacementPlugin(),
      new webpack.NamedModulesPlugin(),
      // new webpack.NoEmitOnErrorsPlugin(),
      new webpack.DefinePlugin({
        'process.env': {
          NODE_ENV: JSON.stringify('development'),
        },
      }),
    ],
    devServer: {
      hot: true,
      contentBase: resolve(__dirname, 'dist'),
      publicPath: '/',
    },
  })
  