UNPKG

kkt

Version:

Create React apps with no build configuration, Cli tool for creating react apps.

18 lines (15 loc) 579 B
import { ParsedArgs } from 'minimist'; import { reactDevUtils } from '../utils/path'; function openBrowser() {} export type OverridesOpenBrowserOptions = ParsedArgs; /** * Disable openBrowser */ export function overridesOpenBrowser(options: OverridesOpenBrowserOptions) { if ((options && options['open-browser'] === false) || process.env.KKT_OPEN_BROWSER === 'true') { const openBrowserPath = `${reactDevUtils}/openBrowser`; require(openBrowserPath); // override config in memory require.cache[require.resolve(openBrowserPath)].exports = openBrowser; } }