Skip to content

Commit 97526e5

Browse files
andysamancyrilwanner
authored andcommitted
Fix optimizeImages configuration (#115)
1 parent fc0c476 commit 97526e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const withOptimizedImages = (nextConfig = {}, nextComposePlugins = {}) => {
2929
// check if it should optimize images in the current step
3030
const optimizeInCurrentStep = nextComposePlugins && typeof nextComposePlugins.phase === 'string'
3131
? (
32-
nextComposePlugins.phase === 'phase-production-build'
33-
|| nextComposePlugins.phase === 'phase-export'
32+
(nextComposePlugins.phase === 'phase-production-build' && optimizeImages)
33+
|| (nextComposePlugins.phase === 'phase-export' && optimizeImages)
3434
|| (nextComposePlugins.phase === 'phase-development-server' && optimizeImagesInDev)
3535
)
3636
: (!dev || optimizeImagesInDev);

0 commit comments

Comments
 (0)