Closed wasimTQ closed 11 months ago
Per the console output you provided, it looks like your sourcemaps are successfully uploaded to Flare.
The sourcemap uploader generates a unique version
id (defaults to uuid()
). This version needs to match the sourcemap_version_id
that the flare js client uses to send an error to Flare.
In the code snippets you provided, I don't see the FLARE_SOURCEMAP_VERSION
being set. Our sourcemap uploader does that here.
You could achieve this in a number of ways:
FLARE_SOURCEMAP_VERSION
on your globalThis objectflare.beforeSubmit
a function that set the sourcemap_version_id
for each reportIf each build has some unique id you could also use that to upload the sourcemaps to each project during the build step.
I was able to upload sourcemaps using the
flareSourcemapUploader
vite plugin in both local and ci (I'm using gitlab ci).But what I need is to be able to upload the sourcemaps using custom code by using a command like
yarn upload
.What I'm doing right now:
dist
in base directory.src/sourcemap
.cd src/sourcemap && yarn && yarn build && yarn upload // (calls node dist/index.js)
Here's the glimpse of the sourcemap code for context:
The output is
File structure:
What I need in the gitlab ci is to be able to build the app once, cache the dist folder alone and use the custom code for sourcemap to manually upload the files in multiple environments without having to build it again and again.
But it doesn't seem like it uploaded it successfully as I can't inspect the code that throws error in flare dashboard.
Let me know if you'll need more details.