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
When adding some logging to this plugins code and running the build, I could see that none of the sourcemap files were showing up in the bundle object.
Basic logging I added to the isSourcemap function:
functionisSourcemap(file: OutputAsset|OutputChunk): file is OutputAsset{// added logging for debuggingconsole.log('a bundled file name: ',file.fileName)if(file.type!=='asset'||!file.fileName.endsWith('.js.map')||!file.source){returnfalse}constsource=typeoffile.source==='string' ? file.source : file.source.toString()constjson=JSON.parse(source)return!!json.sourcesContent&&json.sourcesContent.length>0}
And looks like @honeybadger-io/rollup-plugin requires rollup v3, which adds this breaking change which looks like it allows reading sourcemaps from the in-memory bundle object: rollup/rollup#4605 (comment)
While sourcemaps were written to disk when using bundle.write, they would not appear as files in the in-memory bundle. Again this has been changed: If the sourcemaps are not inline, they are emitted as regular assets directly before generateBundle has run. This allows you to manually remove some sourcemaps in that hook (or re-emit them with changed content). In any case, this very much improves the in-memory experience when running Rollup.
What are the steps to reproduce this issue?
@honeybadger-io/rollup-plugin
and configure as per docsvite build
What happens?
Partial logged build output in the terminal:
What were you expecting to happen?
The sourcemap files would be found and uploaded
Any logs, error output, etc?
See above
Any other comments?
When adding some logging to this plugins code and running the build, I could see that none of the sourcemap files were showing up in the
bundle
object.Basic logging I added to the
isSourcemap
function:What versions are you using?
Operating System: macOS 13.3.1
Package Name:
@honeybadger-io/rollup-plugin
Package Version: 5.4.0
Browser Version: N/A
The text was updated successfully, but these errors were encountered: