mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +00:00
fix(nuxt3): add macro transform to non-sfcs (#2804)
This commit is contained in:
parent
f219f635ad
commit
c1a68012ca
@ -12,8 +12,8 @@ export const TransformMacroPlugin = createUnplugin((options: TransformMacroPlugi
|
||||
name: 'nuxt-pages-macros-transform',
|
||||
enforce: 'post',
|
||||
transformInclude (id) {
|
||||
// We only process SFC files for macros
|
||||
return parseURL(id).pathname.endsWith('.vue')
|
||||
const { search, pathname } = parseURL(id)
|
||||
return pathname.endsWith('.vue') || parseQuery(search).macro
|
||||
},
|
||||
transform (code, id) {
|
||||
const { search } = parseURL(id)
|
||||
|
Loading…
Reference in New Issue
Block a user