(module: BuiltBundlerModule)
| 2298 | const graph = compilation.moduleGraph |
| 2299 | const unbuilt: [BuiltBundlerModule, BuiltModule][] = [] |
| 2300 | const builtOf = (module: BuiltBundlerModule): BuiltModule => { |
| 2301 | const known = built.get(module) |
| 2302 | if (known) return known |
| 2303 | const id = builtIdOf(module) |
| 2304 | // one of the modules Next.js builds a listed package's entry as holds |
| 2305 | // some of the file's re-exports and nothing else, so it's read as its |
| 2306 | // file, which names each, and each import it was built with resolves |
| 2307 | // what the file names so |
| 2308 | const isBarrel = isBarrelModule(module) |
| 2309 | const transformed = |
| 2310 | !!id && isTransformed(id) && (isBarrel || loadsThroughPlugin(module)) |
| 2311 | const of: BuiltModule = { |
| 2312 | id, |
| 2313 | source: |
| 2314 | !id ? undefined |
| 2315 | : transformed ? |
| 2316 | read.loaded.has(id) ? |
| 2317 | read.loaded.get(id) |
| 2318 | : readFile(id) |
| 2319 | : dependencyOf(id) ? undefined |
| 2320 | : module.originalSource?.()?.source().toString(), |
| 2321 | transformed, |
| 2322 | mappings: id && read.mappings.get(id), |
| 2323 | imports: [], |
| 2324 | built: |
| 2325 | transformed && !isBarrel ? |
| 2326 | module.originalSource?.()?.source().toString() |
| 2327 | : undefined |
| 2328 | } |
| 2329 | built.set(module, of) |
| 2330 | unbuilt.push([module, of]) |
| 2331 | return of |
| 2332 | } |
| 2333 | const entries = [...compilation.entries.values(), compilation.globalEntry] |
| 2334 | .flatMap(entry => |
| 2335 | entry ? [...entry.dependencies, ...entry.includeDependencies] : [] |
no test coverage detected