Optionalinitialif this resource entity was renamed during the , emission stage, then its original (absolute) outputPath will get saved here.
Optionalhashspecify if this file entry should be written.
an array of metadata on the loaded input files that were bundled into this physical output file entity.
an array of metadata on the output files that are imported by this file entity during runtime.
each of these is basically associated with a js (import { x, y, z } from "abc"), css (@import url("./blahblah.css")),
or user-import (i.e. OnTransformResult.imports) statement.
Protectedmetafilescans esbuild's metafile outputs to find the input sources bundled into this output file.
the input sources are presented with resolved path information, namespace, onEmit information,
and other additional information acquired from the resource's resolver, loader, and transformer results.
(the collection of this information is stored in metafile.resolvedResourceRegistry,
which is inherited from the SuperBuildContext.)
scans esbuild's metafile outputs to find all file imports performed by this output file. these only include entity imports found by esbuild natively (js imports, css imports, etc...), and not long-build plugin based imports.
this function should be run after all files have been added to your metafile via metafile.addFile, because the imports need to reference the OutputFileEntity associated with the imported file.
Protectedmatchtest if an onEmit handler's filters apply to this output file entity.
perform onEmit action on this output file entity, based on the provided onEmit handlers.
rename this file. you can either provide an absolute path, or a relative path.
relative paths will be resolved with respect to the cwd or esbuild's absWorkingDir.
convert an output file entity to an esbuild-compatible output file description.
(honestly, I don't see myself using it, and if we're overloading esbuild anyway, why don't we overload the OutputFile
interface to include new fields, such as write and external, etc...?)
the absolute output path of this resource entity.