Giter Club home page Giter Club logo

Comments (2)

lforst avatar lforst commented on July 24, 2024 1

Hi, you don't have to use the plugin's injection mechanism. You can simply pass in a release value yourself. For the debug ID mechansim of associating source maps, injection into every file is a necessity, we cannot get around that. The injection should be deterministic so the hash should only change when stuff is actually changing.

from sentry-javascript-bundler-plugins.

Lemonexe avatar Lemonexe commented on July 24, 2024

Hi @lforst , thank you for the explanation. I didn't realize the solution is that simple – explicitly setting the release name in vite.config.mts, and in the app code where we call Sentry.init().

It works wonderfully – vendor.js is not invalidated, errors are assigned to the release name, source maps are uploaded for the release name ✅

So basically, the code injection is a useful default to save us a few lines of config, by setting the release name during runtime. But we can just as well do it explicitly during build time 👍

Suggestion: there could be a brief mention in docs – that disabling injection and setting release name explicitly is useful in case we want to the code-splitting.
Otherwise it truly does mutate the vendor.js, and change its fingerprint, when there were no changes to its content.

from sentry-javascript-bundler-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.