Do not transcode images if they meet the size thresholds
This commit is contained in:
parent
9066067aa4
commit
81c57107ce
6 changed files with 89 additions and 10 deletions
|
@ -1,6 +1,8 @@
|
|||
// Copyright 2019-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
const webpack = require('webpack');
|
||||
|
||||
module.exports = ({ config }) => {
|
||||
config.entry.unshift(
|
||||
'!!style-loader!css-loader!sanitize.css',
|
||||
|
@ -29,5 +31,11 @@ module.exports = ({ config }) => {
|
|||
net: 'net',
|
||||
};
|
||||
|
||||
config.plugins.unshift(
|
||||
new webpack.IgnorePlugin({
|
||||
resourceRegExp: /sharp$/,
|
||||
})
|
||||
);
|
||||
|
||||
return config;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue