Created
May 14, 2022 06:59
-
-
Save acidsound/b68f69e291d852cdb550a2b5ecebaddb to your computer and use it in GitHub Desktop.
Upload sourceMap to Honeybadger.io using vite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npx vite build --outDir build | |
find ./build/assets -name "*.js" -print0 | while read -d $'\0' file | |
do | |
curl https://api.honeybadger.io/v1/source_maps \ | |
-F api_key=$VITE_HONEYBADGER \ | |
-F minified_url=$VITE_APP_BUILD/$(echo $file | sed -e 's/\.\/build\///g') \ | |
-F source_map=@$file.map \ | |
-F minified_file=@$file \; | |
# echo "$VITE_APP_ENDPOINT/$file" | sed -e 's/\.\/build\///g' | |
done | |
rm build/assets/*.map |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment