mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
Fixed subdirectory path replacement
The minified bundle variable name changed. This should sort it out
This commit is contained in:
parent
701f4d3393
commit
020e49e0d5
@ -109,8 +109,8 @@ public class ReactExporter extends FileExporter {
|
||||
} else if (path.endsWith(".js")) {
|
||||
String withReplacedConstants = StringUtils.replaceEach(
|
||||
resource.asString(),
|
||||
new String[]{"PLAN_BASE_ADDRESS", "PLAN_EXPORTED_VERSION", "n.p=\"/\""},
|
||||
new String[]{config.get(WebserverSettings.EXTERNAL_LINK), "true", "n.p=\"" + getBasePath() + "/\""}
|
||||
new String[]{"PLAN_BASE_ADDRESS", "PLAN_EXPORTED_VERSION", ".p=\"/\""},
|
||||
new String[]{config.get(WebserverSettings.EXTERNAL_LINK), "true", ".p=\"" + getBasePath() + "/\""}
|
||||
);
|
||||
export(to, withReplacedConstants);
|
||||
} else {
|
||||
|
@ -245,8 +245,8 @@ public class ResponseFactory {
|
||||
return locale.replaceLanguageInJavascript(contents);
|
||||
})
|
||||
.chain(contents -> StringUtils.replace(contents,
|
||||
"n.p=\"/\"",
|
||||
"n.p=\"" + getBasePath() + "/\""))
|
||||
".p=\"/\"",
|
||||
".p=\"" + getBasePath() + "/\""))
|
||||
.apply();
|
||||
ResponseBuilder responseBuilder = Response.builder()
|
||||
.setMimeType(MimeType.JS)
|
||||
|
Loading…
Reference in New Issue
Block a user