Inject commit SHA or bundle ID into FAB, for things like Rollbar
See original GitHub issueIn https://github.com/bitgenics/linc/issues/14 @qnm mentioned he needs a way to set a unique value for Rollup that changes whenever the Javascript source changes.
Right now the work-around is to use the repository tree_id, but that isn’t ideal, because now the bundle changes on every repository change, even if that change never got into the bundle.
With a pre-package hook in fab-compile we could do something like calculate a checksum of the client JavaScript assets and set that as a id in the settings.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Source Control Integration - Rollbar Docs
View commits in each deploy. When a Rollbar project is connected to a git repository, the list of commits included in each deploy...
Read more >Untitled
Chemical interferences in aas, Visiting santa nyc, 2015 yamaha 1300, Mariachi clasico ... Online money earning sites bd, Anti roll bar link renault...
Read more >Untitled
Navy sister items, Manga tsubasa online, 3126 conflans rd irving tx 75061, ... in pakistan, Plc based control panels in nagpur, Pewdiepie fabulous...
Read more >npmsearchfullcat_npm143.txt - GitHub
=dfellis 2012-07-13 0.1.2 2gis A simple way to use the 2GIS API from Node.js =andreychizh ... Emit custom events from an input so...
Read more >Awesome Ruby
Webpacker - Use Webpack to manage app-like JavaScript modules in Rails. ... Surrounded - Encapsulated related objects in a single system to add...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Oh yeah, loading sourcemaps at runtime is absolutely a terrible idea 😃
The problem is that a
bundle_idis a hash of the entire FAB, so can only be made after the entire FAB has been built, which is well after webpack finished.So I think the ideal solution would be to generate the sourcemaps during built, figure out the
bundle_idafter FAB is built and upload them to Rollbar with thebundle_id. And then use theServerContext.bundle_idto pass that on to HTML.That will also bundle your errors for commits where the code was actually the same.
But it will probably be easier to just get the
commit_shaduring build and use that as normal.I’ll try to find some time to sit with @geelen to see if it is possible to capture this logic in a FAB plugin. Would be great to be able to solve this for any FAB once and for all 😃
This is for sourcemaps, so for context the process is roughly this:
curlor https://github.com/thredup/rollbar-sourcemap-webpack-plugin, containing the the ID in (2) as part of the payloadHow can I have an ID available at both compile-time and run-time?
I’m assuming that loading source maps into Rollbar at run-time is a bad idea.