Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Suppress webpack's critical dependency warnings for libheif

Manav Rathi9eab93cfdf29
diff --git a/web/packages/next/next.config.base.js b/web/packages/next/next.config.base.js
index f0d1481b40..a3076fa5cd 100644
--- a/web/packages/next/next.config.base.js
+++ b/web/packages/next/next.config.base.js
@@ -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;
},
};