diff --git a/deployment/src/main/java/io/quarkiverse/qute/web/deployment/QuteWebProcessor.java b/deployment/src/main/java/io/quarkiverse/qute/web/deployment/QuteWebProcessor.java index 6d6791f6..b2b4eaa4 100644 --- a/deployment/src/main/java/io/quarkiverse/qute/web/deployment/QuteWebProcessor.java +++ b/deployment/src/main/java/io/quarkiverse/qute/web/deployment/QuteWebProcessor.java @@ -69,6 +69,10 @@ public void collectTemplatePaths(TemplateFilePathsBuildItem templateFilePaths, @Consume(SyntheticBeansRuntimeInitBuildItem.class) public RouteBuildItem produceTemplatesRoute(QuteWebRecorder recorder, List templatePaths, HttpRootPathBuildItem httpRootPath, QuteWebBuildTimeConfig config) { + if (templatePaths.isEmpty()) { + // There are no templates to serve + return null; + } return httpRootPath.routeBuilder() .routeFunction(httpRootPath.relativePath(config.rootPath() + "/*"), recorder.initializeRoute()) .handlerType(config.useBlockingHandler() ? HandlerType.BLOCKING : HandlerType.NORMAL)