From b614c9c3236e029ca1b2904a35344cc13f574d43 Mon Sep 17 00:00:00 2001 From: Vojtech Novak Date: Wed, 7 May 2025 15:48:57 +0200 Subject: [PATCH] chore: specify error origin in babel-config.js --- packages/react-native-builder-bob/babel-config.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/react-native-builder-bob/babel-config.js b/packages/react-native-builder-bob/babel-config.js index 8ce5cad78..5ed39fe8f 100644 --- a/packages/react-native-builder-bob/babel-config.js +++ b/packages/react-native-builder-bob/babel-config.js @@ -3,6 +3,8 @@ const path = require('path'); const { loadConfig } = require('./lib/utils/loadConfig'); +const tag = '[react-native-builder-bob]' + /** * Get Babel configuration for the example project. * This sets up appropriate presets and plugins for the library. @@ -18,14 +20,14 @@ const getConfig = (defaultConfig, { root }) => { const result = loadConfig(root); if (result == null) { - throw new Error(`Couldn't find a valid configuration at ${root}.`); + throw new Error(`${tag} Couldn't find a valid configuration at ${root}.`); } const { source } = result.config; if (source == null) { throw new Error( - "Couldn't determine the source directory. Does your config specify a 'source' field?" + `${tag} Couldn't determine the source directory. Does your config specify a 'source' field?` ); }