feat(sveltekit): Read adapter output directory from svelte.config.js#7863
feat(sveltekit): Read adapter output directory from svelte.config.js#7863
svelte.config.js#7863Conversation
| * Make sure, it is registered before the SvelteKit plugin. | ||
| */ | ||
| export function sentrySvelteKit(options: SentrySvelteKitPluginOptions = {}): Plugin[] { | ||
| export async function sentrySvelteKit(options: SentrySvelteKitPluginOptions = {}): Promise<Plugin[]> { |
There was a problem hiding this comment.
This is technically breaking as it changes the return type of the function but the good news is that noone has to await this function as the vite config is perfectly fine with taking a Promise<Plugin[]>. I should have done this already but for some reason decided to stay sync in #7811. I vote we go forward with making it async, not just because we need it for this change but also because it gives us more freedom in the future.
Also, we're still in alpha, so yolo...
AbhiPrasad
left a comment
There was a problem hiding this comment.
I'm fine with shipping this, but it means that that having an e2e test is a requirement for GA then.
Yeah this is a great point! We really should start thinking about E2E/Integration tests soon. |
1b221b2 to
0510596
Compare
0510596 to
09891d8
Compare
Needs #7862
With this PR, our source maps upload plugin is able to read
svelte.config.js. This is necessary to automatically find the output directory that users can specify when setting up the Node adapter.This is a "little" hacky though, because we can't just access the output dir variable. Instead, we actually invoke the adapter (which we can access) and pass a minimal, mostly no-op adapter builder, which will report back the output directory.
(I'm sure this is gonna backfire some day but let's just do it anyway lol)
the good news:
closes #7669