From 86a74577668dfa1518b9f0e0b4dd472112b6afe4 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 cbc969914a..8001e5a1f9 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)