MCPcopy
hub / github.com/freshframework/fresh / configResolved

Function configResolved

packages/plugin-vite/src/mod.ts:224–250  ·  view source on GitHub ↗
(vConfig)

Source from the content-addressed store, hash-verified

222 };
223 },
224 async configResolved(vConfig) {
225 // Run update check in background
226 updateCheck(UPDATE_INTERVAL).catch(() => {});
227
228 fConfig.islandsDir = pathWithRoot(fConfig.islandsDir, vConfig.root);
229 fConfig.routeDir = pathWithRoot(fConfig.routeDir, vConfig.root);
230 fConfig.staticDir = fConfig.staticDir.map((d) =>
231 pathWithRoot(d, vConfig.root)
232 );
233
234 config?.islandSpecifiers?.map((spec) => {
235 const specName = specToName(spec);
236 const name = fConfig.namer.getUniqueName(specName);
237 fConfig.islandSpecifiers.set(spec, name);
238 });
239
240 const envDir = pathWithRoot(
241 vConfig.envDir || vConfig.root,
242 vConfig.root,
243 );
244
245 await loadEnvFile(path.join(envDir, ".env"));
246 await loadEnvFile(path.join(envDir, ".env.local"));
247 const mode = isDev ? "development" : "production";
248 await loadEnvFile(path.join(envDir, `.env.${mode}`));
249 await loadEnvFile(path.join(envDir, `.env.${mode}.local`));
250 },
251 },
252 serverEntryPlugin(fConfig),
253 patches(),

Callers

nothing calls this directly

Calls 5

pathWithRootFunction · 0.90
updateCheckFunction · 0.85
specToNameFunction · 0.85
loadEnvFileFunction · 0.85
getUniqueNameMethod · 0.80

Tested by

no test coverage detected