mirror of
https://github.com/cinnyapp/cinny.git
synced 2024-11-20 06:49:52 +01:00
a3270041e3
Signed-off-by: Ajay Bura <ajbura@gmail.com>
39 lines
927 B
JavaScript
39 lines
927 B
JavaScript
const path = require('path');
|
|
const common = require('./webpack.common');
|
|
const { merge } = require('webpack-merge');
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
|
|
module.exports = merge(common, {
|
|
mode: 'production',
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist'),
|
|
filename: '[name].[contenthash].bundle.js',
|
|
},
|
|
optimization: {
|
|
minimize: true,
|
|
minimizer: [
|
|
'...',
|
|
new CssMinimizerPlugin(),
|
|
],
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.s?css$/,
|
|
use: [
|
|
MiniCssExtractPlugin.loader,
|
|
'css-loader',
|
|
'sass-loader',
|
|
],
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new CleanWebpackPlugin(),
|
|
new MiniCssExtractPlugin({
|
|
filename: '[name].[contenthash].bundle.css',
|
|
}),
|
|
],
|
|
});
|