Skip to content
Discussion options

You must be logged in to vote

For those wanting to use image-blob-reduce with Next 12, I ended up monkey patching Next's webpack config with patch-package.

diff --git a/node_modules/next/dist/build/webpack-config.js b/node_modules/next/dist/build/webpack-config.js
index 5fe4dd5..29168a4 100644
--- a/node_modules/next/dist/build/webpack-config.js
+++ b/node_modules/next/dist/build/webpack-config.js
@@ -560,7 +560,8 @@ async function getBaseWebpackConfig(dir, { buildId , config , dev =false , isSer
             warnings: false,
             // The following two options are known to break valid JavaScript code
             comparisons: false,
-            inline: 2
+            inline: 2,
+            evaluate: false

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by josemanosalvas
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@dartenie
Comment options

@khuezy
Comment options

@marcorm
Comment options

@marcorm
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
6 participants