MCPcopy Index your code
hub / github.com/react/create-react-app / shouldSetBrowsers

Function shouldSetBrowsers

packages/react-dev-utils/browsersHelper.js:25–42  ·  view source on GitHub ↗
(isInteractive)

Source from the content-addressed store, hash-verified

23};
24
25function shouldSetBrowsers(isInteractive) {
26 if (!isInteractive) {
27 return Promise.resolve(true);
28 }
29
30 const question = {
31 type: 'confirm',
32 name: 'shouldSetBrowsers',
33 message:
34 chalk.yellow("We're unable to detect target browsers.") +
35 `\n\nWould you like to add the defaults to your ${chalk.bold(
36 'package.json'
37 )}?`,
38 initial: true,
39 };
40
41 return prompts(question).then(answer => answer.shouldSetBrowsers);
42}
43
44function checkBrowsers(dir, isInteractive, retry = true) {
45 const current = browserslist.loadConfig({ path: dir });

Callers 1

checkBrowsersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected