mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-19 09:55:53 +00:00
fix(nuxt3): parse macro queries for components (#4121)
This commit is contained in:
parent
e561efc6c8
commit
da46b8d165
@ -18,7 +18,7 @@ export const loaderPlugin = createUnplugin((options: LoaderOptions) => ({
|
||||
const query = parseQuery(search)
|
||||
// we only transform render functions
|
||||
// from `type=template` (in Webpack) and bare `.vue` file (in Vite)
|
||||
return pathname.endsWith('.vue') && (query.type === 'template' || !search)
|
||||
return pathname.endsWith('.vue') && (query.type === 'template' || !!query.macro || !search)
|
||||
},
|
||||
transform (code, id) {
|
||||
return transform(code, id, options.getComponents())
|
||||
|
Loading…
Reference in New Issue
Block a user