Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure config file message is only shown once #28017

Merged
merged 2 commits into from Aug 12, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/next/build/babel/loader/get-config.ts
Expand Up @@ -302,6 +302,7 @@ function getCacheKey(cacheCharacteristics: CharacteristicsGermaneToCaching) {

type BabelConfig = any
const configCache: Map<any, BabelConfig> = new Map()
const configFiles: Set<string> = new Set()

export default function getConfig(
this: NextJsLoaderContext,
Expand Down Expand Up @@ -346,7 +347,8 @@ export default function getConfig(
}
}

if (loaderOptions.configFile) {
if (loaderOptions.configFile && !configFiles.has(loaderOptions.configFile)) {
configFiles.add(loaderOptions.configFile)
Log.info(
`Using external babel configuration from ${loaderOptions.configFile}`
)
Expand Down