Skip to content

Commit

Permalink
fix: added check to check if package.json contains output (#786)
Browse files Browse the repository at this point in the history
* fix: added check to check if package.json contains output

* fix: use default value

* chore: rename OUTPUT to EXPECTED_OUTPUT_VALUE
  • Loading branch information
zZHorizonZz authored Oct 14, 2024
1 parent 5b71ac8 commit e322a2f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
public class NextFramework extends GenericFramework {

private static final Logger LOG = Logger.getLogger(NextFramework.class);
private static final String EXPECTED_OUTPUT_VALUE = "export";

public NextFramework() {
super("out", "dev", 3000);
Expand All @@ -31,8 +32,9 @@ public QuinoaConfig override(QuinoaConfig delegate, Optional<JsonObject> package
LOG.warn(
"Make sure you define \"build\": \"next build \", in the package.json to make Next work with Quinoa.");
}
String output = packageJson.get().getString("output");
if (!"export".equals(output)) {

String output = packageJson.get().getString("output", null);
if (!EXPECTED_OUTPUT_VALUE.equals(output)) {
LOG.warn(
"Make sure you define \"output\": \"export \", in the package.json to make Next work with Quinoa.");
}
Expand Down

0 comments on commit e322a2f

Please sign in to comment.