Fix generateResource bug

This commit is contained in:
Joseph Garrone 2025-01-05 21:00:34 +01:00
parent 6309b7c45d
commit c29e600786

View File

@ -681,14 +681,19 @@ export async function generateResources(params: {
}
transformCodebase({
srcDirPath: pathJoin(resourcesDirPath, "theme", themeName),
destDirPath: pathJoin(resourcesDirPath, "theme", themeVariantName),
srcDirPath: pathJoin(resourcesDirPath, "theme", themeName, themeType),
destDirPath: pathJoin(
resourcesDirPath,
"theme",
themeVariantName,
themeType
),
transformSourceCode: isNative
? undefined
: ({ fileRelativePath, sourceCode }) => {
if (
pathExtname(fileRelativePath) === ".ftl" &&
fileRelativePath.split(pathSep).length === 2
fileRelativePath.split(pathSep).length === 1
) {
const modifiedSourceCode = Buffer.from(
Buffer.from(sourceCode)