1c87dc577d
Merge in DNS/adguard-home from add-specs to master Squashed commit of the following: commit 011f9ae643e84b9bcd407cba5d86c586a73f7366 Merge: 856364fb80ed8be1
Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Apr 7 20:20:32 2021 +0300 Merge branch 'master' into add-specs commit 856364fb55901f977b6e25fa3cd90be5f680d3ad Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Apr 7 14:35:00 2021 +0300 all: fix awk invocation commit 202a04f5dd0860c094c887d7fdb71e6424a6d0ce Merge: cdd95cfa00a61fde
Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Apr 6 20:49:05 2021 +0300 Merge branch 'master' into add-specs commit cdd95cfa4e6be74acd4d15a2908504e9e27f29d8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Apr 6 18:03:55 2021 +0300 all: fix specs commit fe2a3017f5c88d429ca6f962dee293338d55919f Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Apr 6 17:30:45 2021 +0300 all: use the correct gpg key commit a28eff00f7a98a078e34c2b16e887c05364b6087 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Apr 6 17:14:28 2021 +0300 all: imp Makefile, specs commit 6faa3c0687387e4fd60433d326a99da01dd21b02 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Apr 6 16:50:41 2021 +0300 all: add bamboo specs
90 lines
2.7 KiB
JavaScript
90 lines
2.7 KiB
JavaScript
const path = require('path');
|
|
const { merge } = require('webpack-merge');
|
|
const baseConfig = require('./webpack.config.base');
|
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
|
const TerserJSPlugin = require('terser-webpack-plugin');
|
|
const Webpack = require('webpack');
|
|
const CopyPlugin = require('copy-webpack-plugin');
|
|
|
|
module.exports = merge(baseConfig, {
|
|
mode: 'production',
|
|
devtool: 'source-map',
|
|
stats: 'minimal',
|
|
performance : {
|
|
hints : false
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, '../../../build2/static'),
|
|
filename: '[name].bundle.[hash:5].js',
|
|
publicPath: '/'
|
|
},
|
|
optimization: {
|
|
minimizer: [new TerserJSPlugin({terserOptions: {
|
|
output: {
|
|
comments: false,
|
|
},
|
|
},
|
|
extractComments: false,
|
|
}), new OptimizeCSSAssetsPlugin({})],
|
|
splitChunks: {
|
|
cacheGroups: {
|
|
styles: {
|
|
name: 'styles',
|
|
test: /\.css$/,
|
|
chunks: 'all',
|
|
enforce: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: (resource) => {
|
|
return (
|
|
resource.indexOf('.pcss')+1
|
|
|| resource.indexOf('.css')+1
|
|
|| resource.indexOf('.less')+1
|
|
) && !(resource.indexOf('.module.')+1);
|
|
},
|
|
use: [{
|
|
loader: MiniCssExtractPlugin.loader,
|
|
}, 'css-loader', 'postcss-loader', {
|
|
loader: 'less-loader',
|
|
options: {
|
|
javascriptEnabled: true,
|
|
},
|
|
}],
|
|
exclude: /node_modules/,
|
|
},
|
|
{
|
|
test: /\.module\.p?css$/,
|
|
use: [
|
|
{
|
|
loader: MiniCssExtractPlugin.loader,
|
|
},
|
|
{
|
|
loader: 'css-loader',
|
|
options: {
|
|
modules: true,
|
|
sourceMap: true,
|
|
importLoaders: 1,
|
|
},
|
|
},
|
|
'postcss-loader',
|
|
],
|
|
exclude: /node_modules/,
|
|
}
|
|
]
|
|
},
|
|
plugins: [
|
|
new Webpack.DefinePlugin({
|
|
DEV: false,
|
|
}),
|
|
new MiniCssExtractPlugin({
|
|
filename: '[name].[hash:5].css',
|
|
}),
|
|
]
|
|
});
|