-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat: adapter-vercel should generate sourcemaps #5197
feat: adapter-vercel should generate sourcemaps #5197
Conversation
🦋 Changeset detectedLatest commit: 9cd0a34 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Thank you! Is there any reason to make this optional? Why wouldn't we always generate it? |
We probably should always generate sourcemaps, but I wonder what the default should be. It's not a simple boolean but an enum. To generate them as separate files probably is a good default, but I could see people wanting something different |
I can't. I think we should just always do linked sourcemaps (i.e. |
Making it |
The adapter-vercel package were not generating sourcemaps. Therefore, it was impossible to correctly use any bug tracking tool.
23af95a
to
9cd0a34
Compare
Thank you for your reviews, I updated this PR according to your comments. However the CI seems broken on Windows but I don't think it's related to this pull-request |
I reran the Windows CI and it passed. I wouldn't worry if it's only one test job that fails. We have some flaky tests |
My one other question is whether we also need to make the same change to the other adapters that use esbuild. I'm guessing we probably do, but haven't checked |
Yes, there is no reason not to do it on other adapters I guess. I did it on the vercel adapter because this is what I'm working on at the moment and it's easy for me to test it, so I'm was confident enought to do it. Do you think other adapters should be updated in this PR as well or should we merge it as is and create other pull-request for different adapters ? |
I'd rather we just do them all in this PR if you don't mind updating it. Only a few of the adapters use esbuild, so hopefully there won't be too much to update. |
I think this should be configurable (on by default). Reason: Source code protection. I know a large company that uses kit in production that needs this option. |
You don't have to provide the source maps to anyone outside your company, so I don't see that as a reason to make it configurable |
Ok thanks. I just don't understand how I could prevent to ship source maps in the current proposal. Would I need to fork the Vercel adapter? |
@8462852 to be clear, we're only talking about sourcemaps for your serverless/edge functions. The sourcemapped stack traces will not be visible to anyone who doesn't have access to https://vercel.com/YOUR_ORG/YOUR_PROJECT/YOUR_DEPLOYMENT_ID/functions?name=YOUR_FUNCTION |
thank you! |
Ideally, include a test that fails without this PR but passes with it.(adapter-vercel package does not have tests)Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0Why
This pull-request adds a new option to enable sourcemap for the generated build. This is really important for error monitoring integration. (eg; Sentry in my case).
For now there is no easy way to debug a production app deployed with sveltkit on vercel.