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

Function config

packages/babel-preset-react-app/webpack-overrides.js:16–31  ·  view source on GitHub ↗
(config, { source })

Source from the content-addressed store, hash-verified

14 return {
15 // This function transforms the Babel configuration on a per-file basis
16 config(config, { source }) {
17 // Babel Macros are notoriously hard to cache, so they shouldn't be
18 // https://github.com/babel/babel/issues/8497
19 // We naively detect macros using their package suffix and add a random token
20 // to the caller, a valid option accepted by Babel, to compose a one-time
21 // cacheIdentifier for the file. We cannot tune the loader options on a per
22 // file basis.
23 if (macroCheck.test(source)) {
24 return Object.assign({}, config.options, {
25 caller: Object.assign({}, config.options.caller, {
26 craInvalidationToken: crypto.randomBytes(32).toString('hex'),
27 }),
28 });
29 }
30 return config.options;
31 },
32 };
33};

Callers

nothing calls this directly

Calls 2

testMethod · 0.80
toStringMethod · 0.80

Tested by

no test coverage detected