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)