From d5494c9a5afaa5095fe146319e76b05e098c68e4 Mon Sep 17 00:00:00 2001 From: Gustavo Aquino Torres Teixeira Date: Sun, 17 Nov 2024 08:11:00 -0300 Subject: [PATCH] fix(kit): use `dst` to deduplicate templates when adding them (#29895) --- packages/kit/src/template.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kit/src/template.ts b/packages/kit/src/template.ts index 8b4ae046fd..2e6aed9339 100644 --- a/packages/kit/src/template.ts +++ b/packages/kit/src/template.ts @@ -22,9 +22,9 @@ export function addTemplate (_template: NuxtTemplate | string) { // Normalize template const template = normalizeTemplate(_template) - // Remove any existing template with the same filename + // Remove any existing template with the same destination path nuxt.options.build.templates = nuxt.options.build.templates - .filter(p => normalizeTemplate(p).filename !== template.filename) + .filter(p => normalizeTemplate(p).dst !== template.dst) // Add to templates array nuxt.options.build.templates.push(template)