Open BjornTheProgrammer opened 1 week ago
for #14763, i added entry_point_index as a field on OutputFile, which is basically the native data structure for BuildArtifact
this could be used to trivially add a sourceFile
property to these, or otherwise we should just implement --metafile
like esbuild does (generate a json file with build metadata)
I did look at that in the source code, and it makes sense to just add it. Then again maybe metafile is the better way to go since it makes Bun.build less compatibility breaking with esbuild
(not sure if that really is a concern).
What is the problem this feature would solve?
With the following build,
This can return the following object
Because the order is not respected, if I added
naming
for the input, it would be impossible to know which one came in first, and from where.What is the feature you are proposing to solve the problem?
The feature I am proposing to solve the indeterminate path problem is adding the initially provided entrypoint, if the output is of kind
entry-point
What alternatives have you considered?
The alternative is to run Bun.build on each entry point separately. But this might cause code duplication and is slower. Additionally it makes it so the paths aren't resolved relative to one another.