mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix JS test cases and other JS build issues caused due to dependabot updates.
This commit is contained in:
@@ -74,19 +74,6 @@ const copyFiles = new CopyPlugin({
|
||||
],
|
||||
});
|
||||
|
||||
const imageMinimizer = new ImageMinimizerPlugin({
|
||||
test: /\.(jpe?g|png|gif)$/i,
|
||||
minimizerOptions: {
|
||||
// Lossless optimization with custom option
|
||||
// Feel free to experiment with options for better result for you
|
||||
plugins: [
|
||||
['mozjpeg', { progressive: true }],
|
||||
['optipng', { optimizationLevel: 7 }],
|
||||
['pngquant', {quality: [0.75, .9], speed: 3}],
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
function cssToBeSkiped(curr_path) {
|
||||
/** Skip all templates **/
|
||||
if(curr_path.indexOf('template') > -1) {
|
||||
@@ -577,7 +564,7 @@ module.exports = [{
|
||||
ignored: /node_modules/,
|
||||
},
|
||||
optimization: {
|
||||
minimizer: [
|
||||
minimizer: PRODUCTION ? [
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
extractComments: true,
|
||||
@@ -585,7 +572,21 @@ module.exports = [{
|
||||
compress: true,
|
||||
},
|
||||
}),
|
||||
],
|
||||
new ImageMinimizerPlugin({
|
||||
test: /\.(jpe?g|png|gif)$/i,
|
||||
minimizer: {
|
||||
implementation: ImageMinimizerPlugin.imageminMinify,
|
||||
options: {
|
||||
plugins: [
|
||||
'imagemin-gifsicle',
|
||||
'imagemin-mozjpeg',
|
||||
'imagemin-pngquant',
|
||||
'imagemin-svgo',
|
||||
],
|
||||
},
|
||||
},
|
||||
}),
|
||||
] : [],
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
vendor_main: {
|
||||
@@ -645,7 +646,6 @@ module.exports = [{
|
||||
sourceMapDevToolPlugin,
|
||||
bundleAnalyzer,
|
||||
copyFiles,
|
||||
imageMinimizer,
|
||||
]: [
|
||||
extractStyle,
|
||||
providePlugin,
|
||||
|
Reference in New Issue
Block a user