When building a manifest, I would like to have references to external files loaded from entry points, not just entry points. For example, my CSS loads a font file, and I would like to reference the hashed name of that file in a <link rel="preload"> tag in HTML using the manifest.
Expected behavior
When building something that uses an external file loader, e.g. in my case a CSS file that points to a font file, I would expect the font file to be part of the manifest.
Sadly, this also ignores things like external files.
Hypothetically, this check (and the mapping that follows) could perhaps see if the output either has a) an entryPoint or b) a single input, which seems to be the case for external files?
Use case
When building a manifest, I would like to have references to external files loaded from entry points, not just entry points. For example, my CSS loads a font file, and I would like to reference the hashed name of that file in a
<link rel="preload">
tag in HTML using the manifest.Expected behavior
When building something that uses an external file loader, e.g. in my case a CSS file that points to a font file, I would expect the font file to be part of the manifest.
Observed behavior
Font file is not part of the manifest.
Hypothesis
It seems this line ignores any outputs that lack the
entryPoint
key: https://github.com/jfortunato/esbuild-plugin-manifest/blob/c1c747fc5a143da93e25727c63391d30a3e3d3db/src/index.ts#L70Sadly, this also ignores things like external files.
Hypothetically, this check (and the mapping that follows) could perhaps see if the output either has a) an
entryPoint
or b) a singleinput
, which seems to be the case for external files?