mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-13 09:33:54 +00:00
fix(macros): ignore nullish id for transform (#3697)
This commit is contained in:
parent
7af60ca9b2
commit
ae8b35173e
@ -13,6 +13,7 @@ export const TransformMacroPlugin = createUnplugin((options: TransformMacroPlugi
|
|||||||
name: 'nuxt:pages-macros-transform',
|
name: 'nuxt:pages-macros-transform',
|
||||||
enforce: 'post',
|
enforce: 'post',
|
||||||
transformInclude (id) {
|
transformInclude (id) {
|
||||||
|
if (!id || id.startsWith('\x00')) { return }
|
||||||
const { search, pathname } = parseURL(id)
|
const { search, pathname } = parseURL(id)
|
||||||
return pathname.endsWith('.vue') || !!parseQuery(search).macro
|
return pathname.endsWith('.vue') || !!parseQuery(search).macro
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user