Skip to content

Commit

Permalink
Allow setting alternative debugger frontend path in development
Browse files Browse the repository at this point in the history
Summary:
Changelog: [Internal]

TSIA

Reviewed By: huntie

Differential Revision: D55074090
  • Loading branch information
motiz88 authored and facebook-github-bot committed Mar 19, 2024
1 parent ed4a4a4 commit 9af7f1a
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion packages/debugger-frontend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,27 @@

const path = require('path');

const frontEndPath = path.join(__dirname, 'dist', 'third-party', 'front_end');
let frontEndPath = path.join(__dirname, 'dist', 'third-party', 'front_end');

if (process.env.REACT_NATIVE_DEBUGGER_FRONTEND_PATH != null) {
frontEndPath = process.env.REACT_NATIVE_DEBUGGER_FRONTEND_PATH;
const ANSI_YELLOW = '\x1b[33m';
const ANSI_GREY = '\x1b[90m';
const ANSI_WHITE = '\x1b[37m';
const ANSI_RESET = '\x1b[0m';
console.warn(
'\n' +
ANSI_YELLOW +
'Using custom debugger frontend path from ' +
ANSI_WHITE +
'process.env.REACT_NATIVE_DEBUGGER_FRONTEND_PATH' +
ANSI_YELLOW +
': ' +
ANSI_GREY +
frontEndPath +
ANSI_RESET +
'\n',
);
}

module.exports = (frontEndPath /*: string */);

0 comments on commit 9af7f1a

Please sign in to comment.