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

feat(sourcemaps): Automatically insert Sentry Vite plugin in Vite config #382

Merged
merged 4 commits into from
Aug 1, 2023

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Jul 27, 2023

This PR adds automatic insertion of the Sentry Vite plugin into users' vite config files:

  • Check if vite.config.(js|ts|cjs|mts) can be found
  • If found, add plugin and import (magicast)
  • If not found or error during insertion, fall back to copy/paste instructions
  • Collect telemetry around sucess/failure of modification and failure reasons

closes #384

@github-actions
Copy link

github-actions bot commented Jul 27, 2023

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against f3ebf86

"fix:eslint": "eslint . --format stylish --fix",
"test": "yarn build && jest",
"try": "ts-node bin.ts",
"try:uninstall": "ts-node bin.ts --uninstall",
"test:watch": "jest --watch --notify"
"test:watch": "jest --watch"
Copy link
Member Author

@Lms24 Lms24 Jul 28, 2023

Choose a reason for hiding this comment

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

--notify seems to cause errors when running test:watch, so I disabled it

@Lms24 Lms24 marked this pull request as ready for review July 28, 2023 08:32
@Lms24 Lms24 requested review from lforst and AbhiPrasad July 28, 2023 08:41
@Lms24 Lms24 force-pushed the lms/feat-sourcemaps-ast-vite branch from 1d61b7a to f3ebf86 Compare August 1, 2023 15:14
@Lms24 Lms24 merged commit 6aac8b4 into master Aug 1, 2023
@Lms24 Lms24 deleted the lms/feat-sourcemaps-ast-vite branch August 1, 2023 15:22
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.

Auto-inject Vite plugin into Vite config AST
2 participants