diff --git a/deployment/src/main/java/io/quarkiverse/quinoa/deployment/framework/override/NextFramework.java b/deployment/src/main/java/io/quarkiverse/quinoa/deployment/framework/override/NextFramework.java index fcea1fdf..8956c696 100644 --- a/deployment/src/main/java/io/quarkiverse/quinoa/deployment/framework/override/NextFramework.java +++ b/deployment/src/main/java/io/quarkiverse/quinoa/deployment/framework/override/NextFramework.java @@ -24,12 +24,13 @@ public QuinoaConfig override(QuinoaConfig delegate, Optional package boolean isCustomized) { if (delegate.packageManagerCommand().build().equals("run build") && packageJson.isPresent()) { JsonObject scripts = packageJson.get().getJsonObject("scripts"); - if (scripts != null) { - if (!scripts.getString("build")) { - LOG.warn( - "Make sure you define \"build\": \"next build \", in the package.json to make Next work with Quinoa."); - } - } + if (scripts != null) { + String buildScript = scripts.getString("build"); + if (buildScript == null || buildScript.isEmpty()) { + LOG.warn("Make sure you define \"build\": \"next build\", in the package.json to make Next work with Quinoa."); + } + } +} } return new QuinoaConfigDelegate(super.override(delegate, packageJson, detectedDevScript, isCustomized)) {