Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions packages/build/src/log/messages/core_steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,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({
Expand All @@ -48,10 +45,6 @@ export const logBundleResults = ({ logs, results = [] }) => {
error: false,
})
}

if (modulesWithDynamicImports.length !== 0) {
logModulesWithDynamicImports({ logs, modulesWithDynamicImports })
}
}

export const logFunctionsNonExistingDir = function (logs, relativeFunctionsSrc) {
Expand Down Expand Up @@ -144,25 +137,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 })
}
Expand Down
Loading