const path = require('path');
const webpackMerge = require('webpack-merge');
const commonConfig = require('./webpack.common');

const CordovaHtmlOutputPlugin = require('../webpack/plugins/CordovaHtmlOutputPlugin.js');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const CleanPlugin = require('clean-webpack-plugin');

module.exports = function() {
  return webpackMerge(commonConfig({ mode: 'production' }), {
    module: {
      rules: [
        {
          test: /\.css$/,
          loader: ['style-loader', 'css-loader']
        }
      ]
    },
    plugins: [
      new CordovaHtmlOutputPlugin(),
      new TerserPlugin({
        extractComments: false
      }),
      new CleanPlugin('www', {
        root: path.join(__dirname, '.'),
        dry: false,
        verbose: false,
        exclude: ['index.html']
      })
    ]
  });
};

@@ -1,34 +1,4 @@
-const path = require('path');%0A
 cons
@@ -185,74 +185,8 @@
 ');%0A
-const ExtractTextPlugin = require('extract-text-webpack-plugin');%0A
 cons

Remove unused constants