mirror of
https://github.com/strapi/strapi.git
synced 2025-12-26 06:35:47 +00:00
Update webpack config
This commit is contained in:
parent
9d72d7373e
commit
667fea4b99
@ -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}
|
||||
|
||||
@ -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$/,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user