fix(nuxt): return null map for empty plugin metadata

This commit is contained in:
Daniel Roe 2024-11-17 15:05:13 -05:00
parent 595b960fda
commit 68b93222a2
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -130,7 +130,7 @@ export const RemovePluginMetadataPlugin = (nuxt: Nuxt) => createUnplugin(() => {
return { return {
code: 'export default () => {}', 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.`) logger.warn(`Plugin \`${plugin.src}\` has no default export and will be ignored at build time. Add \`export default defineNuxtPlugin(() => {})\` to your plugin.`)
return { return {
code: 'export default () => {}', code: 'export default () => {}',
map: { mappings: '' }, map: null,
} }
} }