-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve @sentry/wizard -i sourcemaps for Cloudflare/Wrangler #824
Comments
Hi, thanks for writing in!
This is valuable information, thanks a lot! cc @AbhiPrasad maybe this solves getsentry/sentry-javascript#14841 if this will be our recommended approach for CloudFlare going forward, I think we can definitely create a new source maps wizard flow for CF.
IIRC we discussed this when working on the source map wizards flow a while ago and there were concerns due to package manager compatibility. But maybe we can revisit this. I'll transfer this issue to the wizard repo in the meantime. Thanks for your suggestions! |
Problem Statement
The docs point you to
@sentry/wizard -i sourcemaps
when setting up Cloudflare + sourcemaps.If you're using wrangler's default bundler, that doesn't help you much:
.wrangler/tmp/bundle-{hash}
by default."deploy": "wrangler deploy"
, which takes an--env
arg)Related: getsentry/sentry-javascript#14841
Solution Brainstorm
If you're using the default bundler, you really need to be using
--outdir ./dist
so sentry CLI knows where to look.Also, rather than tacking on
npm run sentry:sourcemaps
, I think using NPM's Pre & Post Scripts would be a better choice, eg:This would allow people to still run
npm deploy -- --env=production
and have sourcemaps uploaded.Even better than that, would be to get Cloudflare to expand their custom builds config, so you could do something after a build and not just before.
The text was updated successfully, but these errors were encountered: