From 68b93222a2a70698b2abd1c66e037e9cc825dda8 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sun, 17 Nov 2024 15:05:13 -0500 Subject: [PATCH] fix(nuxt): return null map for empty plugin metadata --- packages/nuxt/src/core/plugins/plugin-metadata.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nuxt/src/core/plugins/plugin-metadata.ts b/packages/nuxt/src/core/plugins/plugin-metadata.ts index bf2d64c422..9ee9d3e557 100644 --- a/packages/nuxt/src/core/plugins/plugin-metadata.ts +++ b/packages/nuxt/src/core/plugins/plugin-metadata.ts @@ -130,7 +130,7 @@ export const RemovePluginMetadataPlugin = (nuxt: Nuxt) => createUnplugin(() => { return { code: 'export default () => {}', - map: { mappings: '' }, + map: null, } } @@ -140,7 +140,7 @@ export const RemovePluginMetadataPlugin = (nuxt: Nuxt) => createUnplugin(() => { logger.warn(`Plugin \`${plugin.src}\` has no default export and will be ignored at build time. Add \`export default defineNuxtPlugin(() => {})\` to your plugin.`) return { code: 'export default () => {}', - map: { mappings: '' }, + map: null, } }