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