Fix webpack DefinePlugin import to use default export

This commit is contained in:
Valentin Palkovic 2024-12-13 12:51:52 +01:00
parent 980282f955
commit 902dc18344

View File

@ -71,5 +71,5 @@ const setupRuntimeConfig = async (
// Load DefinePlugin with a dynamic import to ensure that Next.js can first
// replace webpack with its own internal instance, and we get that here.
baseConfig.plugins?.push(new (await import('webpack')).DefinePlugin(definePluginConfig));
baseConfig.plugins?.push(new (await import('webpack')).default.DefinePlugin(definePluginConfig));
};