From 39e907b95048d2554e882a6d8f7cfd07d5f9fe27 Mon Sep 17 00:00:00 2001 From: Wesley Luyten Date: Thu, 22 Feb 2024 10:29:34 -0600 Subject: [PATCH] fix: ignore unneeded Webpack warning (#187) related #125 --- src/with-next-video.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/with-next-video.ts b/src/with-next-video.ts index 230584b..79fb90d 100644 --- a/src/with-next-video.ts +++ b/src/with-next-video.ts @@ -60,6 +60,14 @@ export async function withNextVideo(nextConfig: any, videoConfig?: VideoConfig) }, config.externals); } + config.infrastructureLogging = { + ...config.infrastructureLogging, + // Silence warning about dynamic import of next.config file. + // > [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Parsing of /next-video/dist/config.js for build dependencies failed at 'import(fileUrl. + // > Build dependencies behind this expression are ignored and might cause incorrect cache invalidation. + level: 'error', + }; + config.experiments.buildHttp = { allowedUris: [ /https?:\/\/.*\.(mp4|webm|mkv|ogg|ogv|wmv|avi|mov|flv|m4v|3gp)\??(?:&?[^=&]*=[^=&]*)*$/,