diff --git a/packages/runtime/src/helpers/verification.ts b/packages/runtime/src/helpers/verification.ts index 594201ab99..5d6f47618a 100644 --- a/packages/runtime/src/helpers/verification.ts +++ b/packages/runtime/src/helpers/verification.ts @@ -105,6 +105,13 @@ export const checkForRootPublish = ({ } export const checkZipSize = async (file: string, maxSize: number = LAMBDA_MAX_SIZE): Promise<void> => { + // Experimental: We can skip checking for the bundle size on the plugin side. + // Please reach out to the Netlify support team if you'd like to enable this feature + if (!process.env.NETLIFY_CHECK_BUNDLE_SIZE) { + console.log('Skipping the bundle size check. Set env var "NETLIFY_CHECK_BUNDLE_SIZE=true" to enable checking the bundle size') + return + } + if (!existsSync(file)) { console.warn(`Could not check zip size because ${file} does not exist`) return