Skip to content

Commit

Permalink
Allow setting alternative debugger frontend path in development (#43561)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #43561

Changelog: [Internal]

TSIA

Reviewed By: huntie

Differential Revision: D55074090

fbshipit-source-id: 186f1aae98c81c7c2c11209352e40365f44aeb5d
  • Loading branch information
motiz88 authored and facebook-github-bot committed Mar 20, 2024
1 parent d97741a commit ce4d8f2
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 ce4d8f2

Please sign in to comment.