diff --git a/packages/nuxt3/src/components/loader.ts b/packages/nuxt3/src/components/loader.ts index 22849a8bd3..2a595fdc37 100644 --- a/packages/nuxt3/src/components/loader.ts +++ b/packages/nuxt3/src/components/loader.ts @@ -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())