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

@sentry/vite-plugin conflicts with vite-plugin-pwa #239

Closed
3 tasks done
dcramer opened this issue May 7, 2023 · 3 comments
Closed
3 tasks done

@sentry/vite-plugin conflicts with vite-plugin-pwa #239

dcramer opened this issue May 7, 2023 · 3 comments
Labels
bug Something isn't working Status: Stale

Comments

@dcramer
Copy link
Member

dcramer commented May 7, 2023

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/react

SDK Version

7.51.0

Framework Version

No response

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

Add Sentry's vite plugin/suggested flow to this example:

https://github.com/vite-pwa/vite-plugin-pwa/tree/main/examples/react-router/src

Expected Result

The expected result is that it works. Can we remove this from the dang github issue template?

Actual Result

The registerSW.js that appears generated ends up with an invalid statement injected from Sentry:

if ('serviceWorker'in navigator)
    navigator.serviceWorker.register('/dev-sw.js?dev-sw', {
        scope: '/',
        type: 'classic'
    });
import "/@fs/home/dcramer/src/peated/node_modules/@sentry/bundler-plugin-core/sentry-release-injection-file.js?v=ca9b2c4c";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjpudWxsLCJzb3VyY2VzIjpbbnVsbF0sInNvdXJjZXNDb250ZW50IjpbbnVsbF0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=
@lforst
Copy link
Member

lforst commented May 8, 2023

This is gonna be fixed with the next vite-plugin version: #218

@lforst lforst transferred this issue from getsentry/sentry-javascript May 8, 2023
@lforst lforst added the bug Something isn't working label May 8, 2023
@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@lforst
Copy link
Member

lforst commented May 30, 2023

Seems to be fixed

@lforst lforst closed this as completed May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Status: Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants