Seems to be working
This commit is contained in:
@ -25,7 +25,7 @@ export function generateFtlFilesCodeFactory(
|
||||
"jsCode": $(element).html()!
|
||||
});
|
||||
|
||||
$(element).html(fixedJsCode);
|
||||
$(element).text(fixedJsCode);
|
||||
|
||||
});
|
||||
|
||||
@ -88,7 +88,7 @@ export function generateFtlFilesCodeFactory(
|
||||
[
|
||||
'',
|
||||
'<script>',
|
||||
` window.${ftlValuesGlobalName} = { "pageBasename": "${pageBasename}" };'`,
|
||||
` window.${ftlValuesGlobalName} = { "pageBasename": "${pageBasename}" };`,
|
||||
'</script>',
|
||||
''
|
||||
].join("\n"),
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
import { generateFtlFilesCodeFactory } from "./generateFtl";
|
||||
|
||||
|
||||
const reactAppBuildDirPath = pathJoin(__dirname, "build");
|
||||
const reactAppBuildDirPath = pathJoin(process.cwd(), "build");
|
||||
|
||||
assert(
|
||||
fs.existsSync(reactAppBuildDirPath),
|
||||
|
@ -12,7 +12,7 @@ export function replaceImportFromStaticInJsCode(
|
||||
|
||||
const fixedJsCode = jsCode!.replace(
|
||||
/"static\//g,
|
||||
`window.${ftlValuesGlobalName}.url.resourcesPath.replace(/^\//,"") + "/" + "static/`
|
||||
`window.${ftlValuesGlobalName}.url.resourcesPath.replace(/^\\//,"") + "/" + "static/`
|
||||
);
|
||||
|
||||
return { fixedJsCode };
|
||||
@ -80,7 +80,7 @@ export function generateCssCodeToDefineGlobals(
|
||||
")"
|
||||
].join("")
|
||||
].join(" "))
|
||||
.map(line => " " + line),
|
||||
.map(line => ` ${line};`),
|
||||
"}"
|
||||
].join("\n")
|
||||
};
|
||||
|
Reference in New Issue
Block a user