Skip to content

Commit c6d5b79

Browse files
committed
feat: fail build when netlify forms detected without workaround
1 parent 044fc00 commit c6d5b79

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/build/verification.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,9 @@ export async function verifyNetlifyFormsWorkaround(ctx: PluginContext) {
112112
}
113113

114114
export function verifyNetlifyForms(ctx: PluginContext, html: string) {
115-
if (
116-
!verifications.has('netlifyForms') &&
117-
!verifications.has('netlifyFormsWorkaround') &&
118-
formDetectionRegex.test(html)
119-
) {
120-
console.warn(
115+
if (!verifications.has('netlifyFormsWorkaround') && formDetectionRegex.test(html)) {
116+
ctx.failBuild(
121117
'@netlify/plugin-nextjs@5 requires migration steps to support Netlify Forms. Refer to https://ntl.fyi/next-runtime-forms-migration for migration example.',
122118
)
123-
verifications.add('netlifyForms')
124119
}
125120
}

0 commit comments

Comments
 (0)