Depending on the concrete needs of your application, you may wonder which installation method you should use.
Using the Loader Script is the easiest way to start using Sentry. Add a script tag to your application, and we'll take care of setting everything else up correctly for you.
Easy to set up: Just add a script tag to your application.
Easy to upgrade: We'll take care of always shipping the latest version of the SDK to your users. No action's needed from you. This ensures you'll always get the latest features and bug fixes of the Sentry SDK.
Easy to add additional configuration: You can configure the SDK to your liking via
While using the Loader Script has definite advantages, it also comes with some drawbacks. In these scenarios, using the npm package is the better choice:
@sentry/vue) via npm.
Full public API: The Loader Script only exposes a subset of public APIs (for example,
Sentry.captureException(), ...). If you need a lot of custom functionality, you're likely better off with the npm package.
Full control over the SDK version: If you need full control over the SDK version, you'll need to install the SDK via npm.