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
@flareapp/vite-plugin-sourcemap-uploader: Uploading 3 sourcemap files to Flare.
@flareapp/vite-plugin-sourcemap-uploader: Successfully uploaded sourcemaps to Flare.
File structure:
dist
src/frontend
src/sourcemap // It's a standalone folder cloned from this repo
vite.config.ts // Config for the frontend
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.
The text was updated successfully, but these errors were encountered:
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:
set FLARE_SOURCEMAP_VERSION on your globalThis object
assign flare.beforeSubmit a function that set the sourcemap_version_id for each report
fork the js client to add a config option that passed the sourcmap version id.
...
If 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.
The text was updated successfully, but these errors were encountered: