MCPcopy
hub / github.com/rollup/rollup / reloadConfigFile

Function reloadConfigFile

cli/run/watch-cli.ts:41–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39 await reloadConfigFile();
40
41 async function reloadConfigFile() {
42 try {
43 const newConfigFileData = await readFile(configFile, 'utf8');
44 if (newConfigFileData === configFileData) {
45 return;
46 }
47 configFileRevision++;
48 const currentConfigFileRevision = configFileRevision;
49 if (configFileData) {
50 stderr(`\nReloading updated config...`);
51 }
52 configFileData = newConfigFileData;
53 const { options, warnings } = await loadConfigFile(configFile, command, true);
54 if (currentConfigFileRevision !== configFileRevision) {
55 return;
56 }
57 if (watcher) {
58 await watcher.close();
59 }
60 start(options, warnings);
61 } catch (error: any) {
62 handleError(error, true);
63 }
64 }
65 }
66
67 if (configFile) {

Callers 1

Calls 5

stderrFunction · 0.90
loadConfigFileFunction · 0.90
handleErrorFunction · 0.90
startFunction · 0.85
closeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…