From 7b133268d1dc0c39b78d833c68531623b08509d5 Mon Sep 17 00:00:00 2001 From: Rob Stanford Date: Thu, 4 Jul 2024 16:44:20 +0100 Subject: [PATCH] fix: ensure forms workaround globbing works in windows --- src/build/verification.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/build/verification.ts b/src/build/verification.ts index 1adb52b0d4..ceec2e7a95 100644 --- a/src/build/verification.ts +++ b/src/build/verification.ts @@ -94,10 +94,13 @@ const formDetectionRegex = /]*?\s(netlify|data-netlify)[=>\s]/ export async function verifyNetlifyFormsWorkaround(ctx: PluginContext) { const srcDir = ctx.resolveFromSiteDir('public') - const paths = await glob(join(srcDir, '**/*.html')) + const paths = await glob('**/*.html', { + cwd: srcDir, + dot: true, + }) try { for (const path of paths) { - const html = await readFile(path, 'utf-8') + const html = await readFile(join(srcDir, path), 'utf-8') if (formDetectionRegex.test(html)) { verifications.add('netlifyFormsWorkaround') return