1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Only log out using external babelrc once (#4600)

This commit is contained in:
Tim Neutkens 2018-06-16 13:03:42 +02:00 committed by GitHub
parent 3566b92900
commit 4d2ca789d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,7 +24,8 @@ module.exports = babelLoader.custom(babel => {
const options = Object.assign({}, cfg.options)
if (cfg.hasFilesystemConfig()) {
for (const file of [cfg.babelrc, cfg.config]) {
if (file && !configs.has(file)) {
// We only log for client compilation otherwise there will be double output
if (file && !isServer && !configs.has(file)) {
configs.add(file)
console.log(`> Using external babel configuration`)
console.log(`> Location: "${file}"`)