diff --git a/src/plugin.ts b/src/plugin.ts index 283ab3a..fad6802 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -197,6 +197,11 @@ export async function handleApplication(scope: Scope) { config.bundler = next.version >= 16 ? 'turbopack' : 'webpack'; } + if (config.bundler === 'turbopack' && next.version === 14) { + scope.logger.error?.('Turbopack is not supported for Next.js v14. Falling back to webpack.'); + config.bundler = 'webpack'; + } + scope.logger.debug?.(`Detected Next.js version: ${next.version}`); if (config.prebuilt) {