Skip to content

Commit

Permalink
fix: force hotdeploy with hilla (#20251)
Browse files Browse the repository at this point in the history
* fix: force hotdeploy with hilla

* default to false
  • Loading branch information
tepi authored Oct 15, 2024
1 parent f40c6de commit cf41276
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public interface AbstractConfiguration extends Serializable {
boolean isProductionMode();

/**
* Get if the dev server should be enabled. false by default as a
* development bundle is used.
* Get if the dev server should be enabled. Defaults to true if Hilla is in
* use, otherwise defaults to false to enable dev bundle.
*
* @return true if dev server should be used
* @deprecated Use {@link #getMode()} instead
Expand All @@ -53,9 +53,11 @@ public interface AbstractConfiguration extends Serializable {
default boolean frontendHotdeploy() {
if (isProductionMode()) {
return false;
} else if (FrontendUtils.isHillaUsed(getFrontendFolder())) {
return true;
} else {
return getBooleanProperty(InitParameters.FRONTEND_HOTDEPLOY, false);
}
return getBooleanProperty(InitParameters.FRONTEND_HOTDEPLOY,
FrontendUtils.isHillaUsed(getFrontendFolder()));
}

default File getFrontendFolder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,11 @@ public boolean isProductionMode() {
@Override
public boolean frontendHotdeploy() {
if (isOwnProperty(FRONTEND_HOTDEPLOY)) {
return getBooleanProperty(FRONTEND_HOTDEPLOY,
FrontendUtils.isHillaUsed(getFrontendFolder()));
if (FrontendUtils.isHillaUsed(getFrontendFolder())) {
return true;
} else {
return getBooleanProperty(FRONTEND_HOTDEPLOY, false);
}
}
return parentConfig.frontendHotdeploy();
}
Expand Down

0 comments on commit cf41276

Please sign in to comment.