Skip to content
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

ref(sveltekit): Add vite plugin insertion fallback mechanism #379

Merged
merged 4 commits into from
Jul 27, 2023

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Jul 27, 2023

As reported in #363 and #362, our automatic vite plugin insertion for sentrySvelteKit fails when more complex vite config syntax is encountered. We can't reasonably cover these more complex cases but previously we just let the wizard crash, which isn't great either.

This PR now adds a fallback mechanism by showing a copy/paste-able snippet with the necessary vite config adjustments, just like we do it in the source maps wizard:

image

Closes #363
(#362 will be closed in a separate PR)

@Lms24 Lms24 requested review from lforst and AbhiPrasad July 27, 2023 10:12

await fs.promises.writeFile(viteConfigPath, code);
} catch (e) {
// TODO: log e if --debug is set?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will take care of this in a follow-up PR, as we need to bring the --debug flag into the clack-based wizard options first

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Lms24 Lms24 merged commit 4173bd6 into master Jul 27, 2023
@Lms24 Lms24 deleted the lms/ref-sveltekit-vite-plugin-fallback branch July 27, 2023 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sentry SvelteKit Wizard fails with "config.plugins.splice is not a function"
2 participants