import type { Rolldown } from 'vite'; import { type MiniModuleClassifier } from '../module/module.ts'; import type { PackageLocation } from '../placer/placement.ts'; /** * Emits the closed transport table in generateBundle, after placement and content-hash resolution. Each switch case has two * identities: the package-neutral final filename is the SystemJS registration ID, while the package-qualified filename * supplies the literal native require path. Preliminary hash placeholders must not escape into this late-generated file. * * Transport itself executes only as native CommonJS in common/vpt/, separate from the bundled chunk namespace. Together * with bootstrap it publishes native namespaces to SystemJS without re-evaluating their module bodies. * * Do not generate this table in renderChunk: that hook runs before Rolldown's final minifier/code generator, which can rewrite * require.async("path") into require.async(`path`). TikTok (tt) misses these template-literal dependencies in its static scan, * causing "Can't find module" even when the referenced subpackage file exists. This is a dependency-discovery issue, not a * difference in JavaScript string values. * * Emit the finished CommonJS as an asset in generateBundle so Rolldown writes it without minifying or reprinting its quoted * paths. Fixed compact syntax and JSON-encoded IDs need no AST or quote-repair pass, while application chunks retain full * compression, mangling, and whitespace removal. */ export declare function createTransportOutput({ bundle, classifyModule, getPackageLocation }: { bundle: Rolldown.OutputBundle; classifyModule: MiniModuleClassifier; getPackageLocation(chunk: Rolldown.OutputChunk): PackageLocation; }): { type: "asset"; fileName: string; source: string; };