MCPcopy
hub / github.com/rollup/rollup / loadConfigFromWrittenFile

Function loadConfigFromWrittenFile

cli/run/loadConfigFile.ts:172–182  ·  view source on GitHub ↗
(
	bundledFileName: string,
	bundledCode: string
)

Source from the content-addressed store, hash-verified

170}
171
172async function loadConfigFromWrittenFile(
173 bundledFileName: string,
174 bundledCode: string
175): Promise<unknown> {
176 await writeFile(bundledFileName, bundledCode);
177 try {
178 return (await import(pathToFileURL(bundledFileName).href)).default;
179 } finally {
180 unlink(bundledFileName).catch(error => console.warn(error?.message || error));
181 }
182}
183
184async function getConfigList(configFileExport: any, commandOptions: any): Promise<any[]> {
185 const config = await (typeof configFileExport === 'function'

Callers 1

loadTranspiledConfigFileFunction · 0.85

Calls 1

writeFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…