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({ transformCodebase({
srcDirPath: pathJoin(resourcesDirPath, "theme", themeName), srcDirPath: pathJoin(resourcesDirPath, "theme", themeName, themeType),
destDirPath: pathJoin(resourcesDirPath, "theme", themeVariantName), destDirPath: pathJoin(
resourcesDirPath,
"theme",
themeVariantName,
themeType
),
transformSourceCode: isNative transformSourceCode: isNative
? undefined ? undefined
: ({ fileRelativePath, sourceCode }) => { : ({ fileRelativePath, sourceCode }) => {
if ( if (
pathExtname(fileRelativePath) === ".ftl" && pathExtname(fileRelativePath) === ".ftl" &&
fileRelativePath.split(pathSep).length === 2 fileRelativePath.split(pathSep).length === 1
) { ) {
const modifiedSourceCode = Buffer.from( const modifiedSourceCode = Buffer.from(
Buffer.from(sourceCode) Buffer.from(sourceCode)