|
@@ -59,11 +59,21 @@ const nextConfig = {
|
|
|
GIT_SHA: gitSHA(),
|
|
|
},
|
|
|
|
|
|
- // https://dev.to/marcinwosinek/how-to-add-resolve-fallback-to-webpack-5-in-nextjs-10-i6j
|
|
|
+ // Customize the webpack configuration used by Next.js
|
|
|
webpack: (config, { isServer }) => {
|
|
|
+ // https://dev.to/marcinwosinek/how-to-add-resolve-fallback-to-webpack-5-in-nextjs-10-i6j
|
|
|
if (!isServer) {
|
|
|
config.resolve.fallback.fs = false;
|
|
|
}
|
|
|
+
|
|
|
+ // Suppress the warning "Critical dependency: require function is used
|
|
|
+ // in a way in which dependencies cannot be statically extracted" when
|
|
|
+ // import heic-convert.
|
|
|
+ //
|
|
|
+ // Upstream issue, which currently doesn't have a workaround.
|
|
|
+ // https://github.com/catdad-experiments/libheif-js/issues/23
|
|
|
+ config.ignoreWarnings = [{ module: /libheif-js/ }];
|
|
|
+
|
|
|
return config;
|
|
|
},
|
|
|
};
|