Update webpack config

This commit is contained in:
soupette 2019-12-11 11:46:08 +01:00
parent 9d72d7373e
commit 667fea4b99
2 changed files with 8 additions and 28 deletions

View File

@ -59,12 +59,14 @@ const Input = ({
inputLabel = () => <CustomLabel id={label.id} values={{ terms, policy }} />;
}
const inputErrors = get(errors, name, null);
return (
<Inputs
autoFocus={autoFocus}
customBootstrapClass={customBootstrapClass || 'col-12'}
didCheckErrors={didCheckErrors}
errors={get(errors, name, [])}
errors={inputErrors ? [inputErrors] : []}
label={inputLabel}
name={name}
noErrorsDescription={noErrorsDescription}

View File

@ -149,33 +149,11 @@ module.exports = ({
use: 'file-loader',
},
{
test: /\.(jpg|png|gif|ico)$/,
loaders: [
require.resolve('file-loader'),
// Copied from react-boilerplate https://github.com/react-boilerplate/react-boilerplate
{
loader: require.resolve('image-webpack-loader'),
query: {
mozjpeg: {
enabled: false,
// NOTE: mozjpeg is disabled as it causes errors in some Linux environments
// Try enabling it in your environment by switching the config to:
// enabled: true,
// progressive: true,
},
gifsicle: {
interlaced: false,
},
optipng: {
optimizationLevel: 4,
},
pngquant: {
quality: '65-90',
speed: 4,
},
},
},
],
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/, /\.ico$/],
loader: require.resolve('url-loader'),
options: {
limit: 1000,
},
},
{
test: /\.html$/,