Skip to content

Commit 81175a5

Browse files
LekoArtspvdz
andauthored
chore(gatsby-source-contentful): fix locale debug output, again (#28582) (#28623)
(cherry picked from commit 6a79ffc) Co-authored-by: Peter van der Zee <[email protected]>
1 parent 15cf4a2 commit 81175a5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/gatsby-source-contentful/src/gatsby-node.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,17 @@ exports.sourceNodes = async (
296296
const allLocales = locales
297297
locales = locales.filter(pluginConfig.get(`localeFilter`))
298298
reporter.verbose(
299-
`All locales: ${allLocales}, default: ${defaultLocale}, after plugin.options.localeFilter: ${locales}`
299+
`Default locale: ${defaultLocale}. All locales: ${allLocales
300+
.map(({ code }) => code)
301+
.join(`, `)}`
300302
)
303+
if (allLocales.length !== locales.length) {
304+
reporter.verbose(
305+
`After plugin.options.localeFilter: ${locales
306+
.map(({ code }) => code)
307+
.join(`, `)}`
308+
)
309+
}
301310
if (locales.length === 0) {
302311
reporter.panic({
303312
id: CODES.LocalesMissing,

0 commit comments

Comments
 (0)