You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a question or maybe a feature request about the bundle option of the Build API.
Is there any way to get the individual chunks to be bundled?
The outputs.inputs[<path>].bytesInOutput in the result.metafile seems to give us the byte length of the chunks, but it seems difficult to split them exactly because the starting position is unclear.
So, is it possible to return information like startInOutput in addition to bytesInOutput?
Or, if you have an alternative, I would be happy to hear about it.
Example of metafile:
{inputs: { ... },outputs: {
...,'dist/index.js': {
...,entryPoint: 'src/index.ts',inputs: {'src/lib1.ts': {bytesInOutput: 84},'src/index.ts': {bytesInOutput: 0},'src/lib2.ts': {bytesInOutput: 152}// <-- How can I identify the starting byte position?},}}}
The text was updated successfully, but these errors were encountered:
It's not that straightforward because files may be discontiguous in the output file (i.e. in multiple places). You can reconstruct some of this information using source maps, although it depends on what you're looking for. What are you trying to do?
I see, one source file may be output to multiple locations in some cases.
I was looking into the possibility of creating a tool or plugin that could take advantage of esbuild's great transformations, but allow for a little more flexibility in customizing the bundling.
This is a question or maybe a feature request about the
bundle
option of the Build API.Is there any way to get the individual chunks to be bundled?
The
outputs.inputs[<path>].bytesInOutput
in theresult.metafile
seems to give us the byte length of the chunks, but it seems difficult to split them exactly because the starting position is unclear.So, is it possible to return information like
startInOutput
in addition tobytesInOutput
?Or, if you have an alternative, I would be happy to hear about it.
Example of
metafile
:The text was updated successfully, but these errors were encountered: