Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add Hilla packages always when Hilla is available in classpath #20963

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.slf4j.LoggerFactory;

import com.vaadin.experimental.FeatureFlags;
import com.vaadin.flow.internal.hilla.EndpointRequestUtil;
import com.vaadin.flow.server.Constants;
import com.vaadin.flow.server.frontend.scanner.ClassFinder;
import com.vaadin.flow.server.frontend.scanner.FrontendDependencies;
Expand Down Expand Up @@ -606,7 +607,8 @@ private JsonObject generateVersionsFromPackageJson(JsonObject packageJson) {
}

/**
* Adds Hilla components to package.json if Hilla is used in the project.
* Adds Hilla components to package.json if Hilla is available in the
* project's classpath.
*
* @param dependencies
* to be added into package.json
Expand All @@ -618,8 +620,7 @@ private JsonObject generateVersionsFromPackageJson(JsonObject packageJson) {
*/
private void putHillaComponentsDependencies(
Map<String, String> dependencies, String packageJsonKey) {
if (FrontendUtils.isHillaUsed(options.getFrontendDirectory(),
options.getClassFinder())) {
if (EndpointRequestUtil.isHillaAvailable(options.getClassFinder())) {
if (options.isReactEnabled()) {
dependencies.putAll(readDependenciesIfAvailable(
"hilla/components/react", packageJsonKey));
Expand Down
Loading