Skip to content

Commit ce99875

Browse files
committed
docs(js): Use @sentry/bundler-plugins instead of deprecated plugin packages
Replace @sentry/{vite,rollup,webpack,esbuild}-plugin with @sentry/bundler-plugins/<bundler>. Guides that already install @sentry/node import from @sentry/node/<bundler>, so they need no new dependency. Add a Bundler Plugin Options page. Links to npm READMEs and the bundler plugins repo now go to this page or to the bundler guides. Pages for old versions are unchanged.
1 parent 1761b7a commit ce99875

32 files changed

Lines changed: 703 additions & 131 deletions

File tree

‎docs/integrations/deployment/vercel/index.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Use Vercel to [link projects](#project-linking) for uploading source maps and no
6767

6868
- If you have not already done so, [instrument your code with Sentry](/platforms/javascript/).
6969
- Ensure you have [installed a repository integration](/product/releases/setup/release-automation/) and added the relevant repository.
70-
- Add a Sentry bundler plugin to your bundler configuration ([webpack plugin](https://www.npmjs.com/package/@sentry/webpack-plugin), [Vite Plugin](https://www.npmjs.com/package/@sentry/vite-plugin), [Esbuild Plugin](https://www.npmjs.com/package/@sentry/esbuild-plugin), [Rollup Plugin](https://www.npmjs.com/package/@sentry/rollup-plugin)). If you are using Sentry's Next.js, or SvelteKit SDKs this will already have been done for you.
70+
- Add a Sentry bundler plugin to your bundler configuration ([webpack plugin](/platforms/javascript/sourcemaps/uploading/webpack/), [Vite Plugin](/platforms/javascript/sourcemaps/uploading/vite/), [Esbuild Plugin](/platforms/javascript/sourcemaps/uploading/esbuild/), [Rollup Plugin](/platforms/javascript/sourcemaps/uploading/rollup/)). If you are using Sentry's Next.js, or SvelteKit SDKs this will already have been done for you.
7171
- In case you already have a Vercel project integrated with Sentry, ensure the Sentry project you link is the one you're already using to report errors.
7272

7373
### Drains

‎docs/platforms/javascript/common/best-practices/micro-frontends.mdx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ fix them faster in complex frontend architectures.
6363
<Alert>
6464
<ul>
6565
<li>
66-
Requires version `2.18.0` or higher of `@sentry/webpack-plugin`,
67-
`@sentry/rollup-plugin`, `@sentry/vite-plugin` or
68-
`@sentry/esbuild-plugin`.
66+
Requires `@sentry/bundler-plugins/webpack`,
67+
`@sentry/bundler-plugins/rollup`, `@sentry/bundler-plugins/vite` or
68+
`@sentry/bundler-plugins/esbuild`.
6969
</li>
7070
<li>Requires SDK version `7.59.0` or higher.</li>
7171
</ul>
@@ -80,7 +80,7 @@ below is for Webpack, but this is also supported in Vite, Rollup, and esbuild.
8080

8181
```javascript
8282
// webpack.config.js
83-
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");
83+
const { sentryWebpackPlugin } = require("@sentry/bundler-plugins/webpack");
8484

8585
module.exports = {
8686
devtool: "hidden-source-map", // Source map generation must be turned on ("hidden-source-map", "source-map", etc.)

‎docs/platforms/javascript/common/configuration/filtering.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ This integration can be very helpful in reducing noise that's not related to you
5757

5858
<Alert>
5959

60-
**Prerequisite**: To use the `thirdPartyErrorFilterIntegration`, ensure you are using a bundler and one of [Sentry's bundler plugins](https://github.com/getsentry/sentry-javascript-bundler-plugins). For **Next.js**, set the [`applicationKey`](/platforms/javascript/guides/nextjs/configuration/build/#applicationKey) build option, which works for both Webpack and Turbopack builds.
60+
**Prerequisite**: To use the `thirdPartyErrorFilterIntegration`, ensure you are using a bundler and one of <PlatformLink to="/sourcemaps/uploading/bundler-plugin-options/#applicationKey">Sentry's bundler plugins</PlatformLink>. For **Next.js**, set the [`applicationKey`](/platforms/javascript/guides/nextjs/configuration/build/#applicationKey) build option, which works for both Webpack and Turbopack builds.
6161

6262
</Alert>
6363

‎docs/platforms/javascript/common/configuration/tree-shaking.mdx‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ If you're using one of our bundler plugins, you can use the `bundleSizeOptimizat
3737

3838
<PlatformCategorySection supported={['browser']}>
3939
```javascript
40-
// For example, the @sentry/webpack-plugin passed to the webpack config
40+
// For example, the @sentry/bundler-plugins/webpack passed to the webpack config
4141
sentryPlugin({
4242
// other config
4343
bundleSizeOptimizations: {
@@ -55,7 +55,7 @@ sentryPlugin({
5555

5656
<PlatformCategorySection supported={['server']}>
5757
```javascript
58-
// For example, the @sentry/webpack-plugin passed to the webpack config
58+
// For example, the @sentry/bundler-plugins/webpack passed to the webpack config
5959
sentryPlugin({
6060
// other config
6161
bundleSizeOptimizations: {
@@ -68,10 +68,11 @@ sentryPlugin({
6868

6969
For more details, see the documentation for the specific bundler plugin you're using:
7070

71-
- [Sentry Webpack Plugin](https://www.npmjs.com/package/@sentry/webpack-plugin)
72-
- [Sentry Vite Plugin](https://www.npmjs.com/package/@sentry/vite-plugin)
73-
- [Sentry Esbuild Plugin](https://www.npmjs.com/package/@sentry/esbuild-plugin)
74-
- [Sentry Rollup Plugin](https://www.npmjs.com/package/@sentry/rollup-plugin)
71+
- <PlatformLink to="/sourcemaps/uploading/webpack/">Sentry Webpack Plugin</PlatformLink>
72+
- <PlatformLink to="/sourcemaps/uploading/vite/">Sentry Vite Plugin</PlatformLink>
73+
- <PlatformLink to="/sourcemaps/uploading/esbuild/">Sentry Esbuild Plugin</PlatformLink>
74+
- <PlatformLink to="/sourcemaps/uploading/rollup/">Sentry Rollup Plugin</PlatformLink>
75+
- <PlatformLink to="/sourcemaps/uploading/bundler-plugin-options/#bundle-size-optimizations">Bundler Plugin Options</PlatformLink>
7576

7677
</PlatformSection>
7778

‎docs/platforms/javascript/common/session-replay/configuration.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ replayIntegration({
125125
});
126126
```
127127

128-
4. (optional) To reduce bundle size, you can now <PlatformLink to="/configuration/tree-shaking/">Tree Shake</PlatformLink> the default included worker script. If you are using one of the [Sentry Bundler Plugins](https://github.com/getsentry/sentry-javascript-bundler-plugins) (version 2.10.0 or later):
128+
4. (optional) To reduce bundle size, you can now <PlatformLink to="/configuration/tree-shaking/">Tree Shake</PlatformLink> the default included worker script. If you are using one of the <PlatformLink to="/sourcemaps/uploading/bundler-plugin-options/#bundleSizeOptimizations.excludeReplayWorker">Sentry Bundler Plugins</PlatformLink> (version 2.10.0 or later):
129129

130130
```javascript
131131
sentryPlugin({

‎docs/platforms/javascript/common/sourcemaps/uploading/angular-nx.mdx‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,21 @@ SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
7171
Install the Sentry Webpack plugin:
7272

7373
```shell {tabTitle:npm}
74-
npm install @sentry/webpack-plugin --save-dev
74+
npm install @sentry/bundler-plugins --save-dev
7575
```
7676

7777
```shell {tabTitle:yarn}
78-
yarn add @sentry/webpack-plugin --dev
78+
yarn add @sentry/bundler-plugins --dev
7979
```
8080

8181
```shell {tabTitle:pnpm}
82-
pnpm add @sentry/webpack-plugin --save-dev
82+
pnpm add @sentry/bundler-plugins --save-dev
8383
```
8484

8585
Register the Sentry webpack plugin in your `webpack.config.js`:
8686

8787
```javascript {filename:webpack.config.js}
88-
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");
88+
const { sentryWebpackPlugin } = require("@sentry/bundler-plugins/webpack");
8989

9090
module.exports = {
9191
// ... other config above ...
@@ -110,30 +110,30 @@ module.exports = {
110110
<Alert level="warning">
111111
Generating source maps **may expose them to the public**, potentially causing your
112112
source code to be leaked. You can prevent this by configuring your server to
113-
deny access to `.js.map` files, or by using [Sentry Webpack Plugin's
114-
`sourcemaps.filesToDeleteAfterUpload`](https://www.npmjs.com/package/@sentry/webpack-plugin#sourcemapsfilestodeleteafterupload)
113+
deny access to `.js.map` files, or by using <PlatformLink to="/sourcemaps/uploading/bundler-plugin-options/#sourcemaps.filesToDeleteAfterUpload">Sentry Webpack Plugin's
114+
`sourcemaps.filesToDeleteAfterUpload`</PlatformLink>
115115
option to delete source maps after they've been uploaded to Sentry.
116116
</Alert>
117117

118-
Learn more about configuring the plugin in our [Sentry webpack plugin documentation](https://www.npmjs.com/package/@sentry/webpack-plugin).
118+
Learn more about configuring the plugin in our <PlatformLink to="/sourcemaps/uploading/bundler-plugin-options/">Sentry webpack plugin documentation</PlatformLink>.
119119

120120
### esbuild
121121

122122
Install the Sentry esbuild plugin:
123123

124124
```shell {tabTitle:npm}
125-
npm install @sentry/esbuild-plugin --save-dev
125+
npm install @sentry/bundler-plugins --save-dev
126126
```
127127

128128
```shell {tabTitle:yarn}
129-
yarn add @sentry/esbuild-plugin --dev
129+
yarn add @sentry/bundler-plugins --dev
130130
```
131131

132132
```shell {tabTitle:pnpm}
133-
pnpm add @sentry/esbuild-plugin --save-dev
133+
pnpm add @sentry/bundler-plugins --save-dev
134134
```
135135

136-
Then, follow the [official Nx documentation](https://nx.dev/nx-api/angular/executors/browser-esbuild#examples) to register the Sentry esbuild plugin (`@sentry/esbuild-plugin`) in your `project.json` file. For example:
136+
Then, follow the [official Nx documentation](https://nx.dev/nx-api/angular/executors/browser-esbuild#examples) to register the Sentry esbuild plugin (`@sentry/bundler-plugins/esbuild`) in your `project.json` file. For example:
137137

138138
```json {filename:project.json}
139139
{
@@ -143,7 +143,7 @@ Then, follow the [official Nx documentation](https://nx.dev/nx-api/angular/execu
143143
"options": {
144144
"plugins": [
145145
{
146-
"path": "@sentry/esbuild-plugin",
146+
"path": "@sentry/bundler-plugins/esbuild",
147147
"options": {
148148
"org": "___ORG_SLUG___",
149149
"project": "___PROJECT_SLUG___",
@@ -160,8 +160,8 @@ Then, follow the [official Nx documentation](https://nx.dev/nx-api/angular/execu
160160
<Alert level="warning">
161161
Generating source maps **may expose them to the public**, potentially causing your
162162
source code to be leaked. You can prevent this by configuring your server to
163-
deny access to `.js.map` files, or by using [Sentry Esbuild Plugin's
164-
`sourcemaps.filesToDeleteAfterUpload`](https://www.npmjs.com/package/@sentry/esbuild-plugin#sourcemapsfilestodeleteafterupload)
163+
deny access to `.js.map` files, or by using <PlatformLink to="/sourcemaps/uploading/bundler-plugin-options/#sourcemaps.filesToDeleteAfterUpload">Sentry Esbuild Plugin's
164+
`sourcemaps.filesToDeleteAfterUpload`</PlatformLink>
165165
option to delete source maps after they've been uploaded to Sentry.
166166
</Alert>
167167

‎docs/platforms/javascript/common/sourcemaps/uploading/angular-webpack.mdx‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ Before you start configuring the source maps upload, make sure that you're [gene
2121
Install the custom webpack builder for Angular and the Sentry webpack plugin:
2222

2323
```shell {tabTitle:npm}
24-
npm install @angular-builders/custom-webpack @sentry/webpack-plugin --save-dev
24+
npm install @angular-builders/custom-webpack @sentry/bundler-plugins --save-dev
2525
```
2626

2727
```shell {tabTitle:yarn}
28-
yarn add @angular-builders/custom-webpack @sentry/webpack-plugin --dev
28+
yarn add @angular-builders/custom-webpack @sentry/bundler-plugins --dev
2929
```
3030

3131
```shell {tabTitle:pnpm}
32-
pnpm add @angular-builders/custom-webpack @sentry/webpack-plugin --save-dev
32+
pnpm add @angular-builders/custom-webpack @sentry/bundler-plugins --save-dev
3333
```
3434

3535
## Configure
@@ -97,7 +97,7 @@ SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
9797
Register the Sentry Webpack plugin in your `webpack.config.js`:
9898

9999
```javascript {filename:webpack.config.js}
100-
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");
100+
const { sentryWebpackPlugin } = require("@sentry/bundler-plugins/webpack");
101101

102102
module.exports = {
103103
// ... other config above ...
@@ -119,7 +119,7 @@ module.exports = {
119119
};
120120
```
121121

122-
Learn more about configuring the plugin in our [Sentry webpack plugin documentation](https://www.npmjs.com/package/@sentry/webpack-plugin).
122+
Learn more about configuring the plugin in our <PlatformLink to="/sourcemaps/uploading/bundler-plugin-options/">Sentry webpack plugin documentation</PlatformLink>.
123123

124124
### 3. Upload
125125

@@ -139,7 +139,7 @@ We recommend running a production build to test your implementation.
139139
<Alert level="warning">
140140
Generating source maps **may expose them to the public**, potentially causing your
141141
source code to be leaked. You can prevent this by configuring your server to
142-
deny access to `.js.map` files, or by using [Sentry Webpack Plugin's
143-
`sourcemaps.filesToDeleteAfterUpload`](https://www.npmjs.com/package/@sentry/webpack-plugin#sourcemapsfilestodeleteafterupload)
142+
deny access to `.js.map` files, or by using <PlatformLink to="/sourcemaps/uploading/bundler-plugin-options/#sourcemaps.filesToDeleteAfterUpload">Sentry Webpack Plugin's
143+
`sourcemaps.filesToDeleteAfterUpload`</PlatformLink>
144144
option to delete source maps after they've been uploaded to Sentry.
145145
</Alert>

0 commit comments

Comments
 (0)