JulianMar / nuxt-bugsnag

Bugsnag module for nuxt.js
MIT License
49 stars 17 forks source link

Question: Don't deploy it with `npm run generate` #76

Closed albertcito closed 3 weeks ago

albertcito commented 1 month ago

If I run npm run generate it automatically will call:

[log] [nitro]
[start] [nitro] upload of sourcemaps to bugsnag 
...
[log] [nitro]
[success] [nitro] upload of sourcemaps to bugsnag 

Is there a way to don't upload the files in with npm run generate and add a new script like npm run bugsnag in order to transform to source map and upload the files to Bugsnag?

JulianMar commented 1 month ago

Hey, you can disable the upload via the option here.

I think you cannot define commands right now in a nuxt module. So sorry, this is not possible right now.

albertcito commented 1 month ago

Thank you very much. I wanted to improve my github actions. And let the upload to Bugsnag in the end of the process. But looks like it's not possible yet.

My idea was something like:

JulianMar commented 1 month ago

Best approach would be to disable the uploading of the sourcemaps in the module and write your own script to upload the sourcemaps.

The Module is only using the bugsnag tools under the hood.

on Line 111 is the function which is uploading the sourcemap. You can write your own little uploader and run it in your script.

Good Luck, if you need more help you can just comment under this issue.