/******************************************************************************* * Copyright (c) 2018-2018 Red Hat, Inc. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which is available at http://www.eclipse.org/legal/epl-2.0.html * * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Red Hat, Inc. - initial API and implementation *******************************************************************************/ const merge = require('webpack-merge'); const common = require('./webpack.common.js'); const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); module.exports = merge(common, { mode: 'production', devtool: 'source-map', module: { rules: [ { test: /\.css$/, use: [ { loader: MiniCssExtractPlugin.loader, }, "css-loader" ] } ], }, plugins: [ new UglifyJSPlugin({ sourceMap: true }), new HtmlWebpackPlugin({ inject: false, template: 'src/index.html', title: 'Che Workspace Loader', urlPrefix: '/workspace-loader/loader/', cssName: 'style.css' }), new MiniCssExtractPlugin({ filename: "style.css" }) ] });