diff --git a/packages/build/src/log/messages/core_steps.js b/packages/build/src/log/messages/core_steps.js index 705ea5d6f5..1fa883f383 100644 --- a/packages/build/src/log/messages/core_steps.js +++ b/packages/build/src/log/messages/core_steps.js @@ -30,9 +30,6 @@ export const logBundleResults = ({ logs, results = [] }) => { const resultsWithWarnings = results.filter( ({ bundler, bundlerWarnings }) => bundler === 'esbuild' && bundlerWarnings && bundlerWarnings.length !== 0, ) - const modulesWithDynamicImports = [ - ...new Set(results.flatMap((result) => result.nodeModulesWithDynamicImports || [])), - ] if (resultsWithErrors.length !== 0) { logBundleResultFunctions({ @@ -51,10 +48,6 @@ export const logBundleResults = ({ logs, results = [] }) => { error: false, }) } - - if (modulesWithDynamicImports.length !== 0) { - logModulesWithDynamicImports({ logs, modulesWithDynamicImports }) - } } /** @@ -204,25 +197,6 @@ export const logDbMigrations = function ({ logs, migrations, srcDir }) { logArray(logs, migrations, { indent: false }) } -const logModulesWithDynamicImports = ({ logs, modulesWithDynamicImports }) => { - const externalNodeModules = modulesWithDynamicImports.map((moduleName) => `"${moduleName}"`).join(', ') - - logWarningSubHeader(logs, `The following Node.js modules use dynamic expressions to include files:`) - logArray(logs, modulesWithDynamicImports) - log( - logs, - `\n Because files included with dynamic expressions aren't bundled with your serverless functions by default, - this may result in an error when invoking a function. To resolve this error, you can mark these Node.js - modules as external in the [functions] section of your \`netlify.toml\` configuration file: - - [functions] - external_node_modules = [${externalNodeModules}] - - Visit https://ntl.fyi/dynamic-imports for more information. - `, - ) -} - export const logSecretsScanSkipMessage = function (logs, msg) { log(logs, msg, { color: THEME.warningHighlightWords }) }