MCPcopy Create free account
hub / github.com/vercel/vercel / writeEntrypointFile

Function writeEntrypointFile

packages/remix/src/build-legacy.ts:840–855  ·  view source on GitHub ↗
(
  path: string,
  data: string,
  rootDir: string
)

Source from the content-addressed store, hash-verified

838}
839
840async function writeEntrypointFile(
841 path: string,
842 data: string,
843 rootDir: string
844) {
845 try {
846 await fs.writeFile(path, data);
847 } catch (err: any) {
848 if (err.code === 'ENOENT') {
849 throw new Error(
850 `The "${relative(rootDir, dirname(path))}" directory does not exist.`
851 );
852 }
853 throw err;
854 }
855}

Callers 2

createRenderNodeFunctionFunction · 0.85
createRenderEdgeFunctionFunction · 0.85

Calls 1

relativeFunction · 0.90

Tested by

no test coverage detected