MCPcopy Create free account
hub / github.com/ampproject/amphtml / lazyBuildJs

Function lazyBuildJs

build-system/server/lazy-build.js:123–126  ·  view source on GitHub ↗

* Lazy builds a non-extension JS file when requested. * * @param {!Object} req * @param {!Object} _res * @param {function(): void} next * @return {Promise }

(req, _res, next)

Source from the content-addressed store, hash-verified

121 * @return {Promise<void>}
122 */
123async function lazyBuildJs(req, _res, next) {
124 const matcher = argv.esm ? /\/.*\/([^\/]*\.mjs)/ : /\/.*\/([^\/]*\.js)/;
125 await lazyBuild(req.url, matcher, jsBundles, doBuildJs, next);
126}
127
128/**
129 * Lazy builds a 3p iframe vendor file when requested.

Callers

nothing calls this directly

Calls 1

lazyBuildFunction · 0.85

Tested by

no test coverage detected