We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc0c476 commit 97526e5Copy full SHA for 97526e5
lib/index.js
@@ -29,8 +29,8 @@ const withOptimizedImages = (nextConfig = {}, nextComposePlugins = {}) => {
29
// check if it should optimize images in the current step
30
const optimizeInCurrentStep = nextComposePlugins && typeof nextComposePlugins.phase === 'string'
31
? (
32
- nextComposePlugins.phase === 'phase-production-build'
33
- || nextComposePlugins.phase === 'phase-export'
+ (nextComposePlugins.phase === 'phase-production-build' && optimizeImages)
+ || (nextComposePlugins.phase === 'phase-export' && optimizeImages)
34
|| (nextComposePlugins.phase === 'phase-development-server' && optimizeImagesInDev)
35
)
36
: (!dev || optimizeImagesInDev);
0 commit comments