Skip to content

chore: specify error origin in babel-config.js #835

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
6 changes: 4 additions & 2 deletions packages/react-native-builder-bob/babel-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
const path = require('path');
const { loadConfig } = require('./lib/utils/loadConfig');

const tag = '[react-native-builder-bob]'

Check failure on line 6 in packages/react-native-builder-bob/babel-config.js

View workflow job for this annotation

GitHub Actions / check-project

Insert `;`

/**
* Get Babel configuration for the example project.
* This sets up appropriate presets and plugins for the library.
Expand All @@ -18,14 +20,14 @@
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?`
);
}

Expand Down
Loading