MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / applyExternalConfigs

Function applyExternalConfigs

packages/vite/helpers/external-configs.ts:15–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13 * @internal
14 */
15export function applyExternalConfigs() {
16 for (const dependency of getAllDependencies()) {
17 const packagePath = getDependencyPath(dependency);
18
19 if (!packagePath) {
20 continue;
21 }
22
23 const configPath = path.join(packagePath, 'nativescript.vite.mjs');
24
25 if (fs.existsSync(configPath)) {
26 console.log(`Found and merged in external config: ${configPath}`);
27
28 try {
29 const externalModule = require(configPath);
30 const externalConfig = externalModule?.default ?? externalModule;
31 externalConfigMerges.push(externalConfig());
32 } catch (err) {
33 console.warn(`
34 Unable to apply config: ${configPath}.
35 Error is: ${err}
36 `);
37 }
38 }
39 }
40}

Callers 1

base.tsFile · 0.50

Calls 6

joinMethod · 0.80
warnMethod · 0.80
getAllDependenciesFunction · 0.70
getDependencyPathFunction · 0.70
logMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected