From da46b8d1652be53c9e4dd8b3e71b50ea3d99dee4 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 6 Apr 2022 11:05:37 +0100 Subject: [PATCH] fix(nuxt3): parse macro queries for components (#4121) --- packages/nuxt3/src/components/loader.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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())