diff --git a/.changeset/hot-hotels-tie.md b/.changeset/hot-hotels-tie.md new file mode 100644 index 00000000000..2cf3f676b8b --- /dev/null +++ b/.changeset/hot-hotels-tie.md @@ -0,0 +1,5 @@ +--- +'@keystone-next/keystone': patch +--- + +Fixed Admin UI generation to allow files returned from `getAdditionalFiles` to overwrite the files generated by Keystone diff --git a/packages-next/keystone/src/admin-ui/system/generateAdminUI.ts b/packages-next/keystone/src/admin-ui/system/generateAdminUI.ts index d9bfd4b2440..250a48e1249 100644 --- a/packages-next/keystone/src/admin-ui/system/generateAdminUI.ts +++ b/packages-next/keystone/src/admin-ui/system/generateAdminUI.ts @@ -89,7 +89,7 @@ export const generateAdminUI = async ( ); await Promise.all( adminFiles - .filter(x => !uniqueFiles.has(Path.normalize(x.outputPath))) + .filter(x => !uniqueFiles.has(Path.normalize(Path.join(projectAdminPath, x.outputPath)))) .map(file => writeAdminFile(file, projectAdminPath)) );