Skip to content

Commit baff297

Browse files
authored
Callout to add .env to .gitignore #11430
Closes getsentry/sentry#77903
1 parent c62ba9d commit baff297

File tree

6 files changed

+26
-29
lines changed

6 files changed

+26
-29
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ To upload source maps you have to configure an [Organization Auth Token](https:/
5757

5858
Alternatively, you can also use a [User Auth Token](https://sentry.io/orgredirect/organizations/:orgslug/settings/account/api/auth-tokens/), with the "Project: Read & Write" and "Release: Admin" permissions.
5959

60-
Auth tokens can be passed to the plugin explicitly with the `authToken` option, with a `SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file in the working directory when building your project.
60+
Auth tokens can be passed to the plugin explicitly with the `authToken` option, with a `SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file (don't forget to add it to your `.gitignore` file, as this is sensitive data) in the working directory when building your project.
6161
We recommend you add the auth token to your CI/CD environment as an environment variable.
6262

6363
<OrgAuthTokenNote />
@@ -84,7 +84,6 @@ pnpm add @sentry/webpack-plugin --save-dev
8484

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

87-
8887
```javascript {filename:webpack.config.js}
8988
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");
9089

@@ -104,8 +103,8 @@ module.exports = {
104103

105104
<Alert>
106105
Generating sourcemaps may expose them to the public, potentially causing your
107-
source code to be leaked. You can prevent this by configuring your server to deny access to `.js.map` files, or by
108-
using [Sentry Webpack Plugin's
106+
source code to be leaked. You can prevent this by configuring your server to
107+
deny access to `.js.map` files, or by using [Sentry Webpack Plugin's
109108
`sourcemaps.filesToDeleteAfterUpload`](https://www.npmjs.com/package/@sentry/webpack-plugin#sourcemapsfilestodeleteafterupload)
110109
option to delete source maps after they've been uploaded to Sentry.
111110
</Alert>
@@ -154,8 +153,8 @@ Then, follow the [official Nx documentation](https://nx.dev/nx-api/angular/execu
154153

155154
<Alert>
156155
Generating sourcemaps may expose them to the public, potentially causing your
157-
source code to be leaked. You can prevent this by configuring your server to deny access to `.js.map` files, or by
158-
using [Sentry Esbuild Plugin's
156+
source code to be leaked. You can prevent this by configuring your server to
157+
deny access to `.js.map` files, or by using [Sentry Esbuild Plugin's
159158
`sourcemaps.filesToDeleteAfterUpload`](https://www.npmjs.com/package/@sentry/esbuild-plugin#sourcemapsfilestodeleteafterupload)
160159
option to delete source maps after they've been uploaded to Sentry.
161160
</Alert>

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ To upload source maps you have to configure an [Organization Auth Token](https:/
8585

8686
Alternatively, you can also use a [User Auth Token](https://sentry.io/orgredirect/organizations/:orgslug/settings/account/api/auth-tokens/), with the "Project: Read & Write" and "Release: Admin" permissions.
8787

88-
Auth tokens can be passed to the plugin explicitly with the `authToken` option, with a `SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file in the working directory when building your project.
88+
Auth tokens can be passed to the plugin explicitly with the `authToken` option, with a `SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file (don't forget to add it to your `.gitignore` file, as this is sensitive data) in the working directory when building your project.
8989
We recommend you add the auth token to your CI/CD environment as an environment variable.
9090

9191
<OrgAuthTokenNote />
@@ -96,7 +96,6 @@ SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
9696

9797
Register the Sentry Webpack plugin in your `webpack.config.js`:
9898

99-
10099
```javascript {filename:webpack.config.js}
101100
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");
102101

@@ -133,8 +132,8 @@ We recommend running a production build to test your implementation.
133132

134133
<Alert>
135134
Generating sourcemaps may expose them to the public, potentially causing your
136-
source code to be leaked. You can prevent this by configuring your server to deny access to `.js.map` files, or by
137-
using [Sentry Webpack Plugin's
135+
source code to be leaked. You can prevent this by configuring your server to
136+
deny access to `.js.map` files, or by using [Sentry Webpack Plugin's
138137
`sourcemaps.filesToDeleteAfterUpload`](https://www.npmjs.com/package/@sentry/webpack-plugin#sourcemapsfilestodeleteafterupload)
139138
option to delete source maps after they've been uploaded to Sentry.
140139
</Alert>

docs/platforms/javascript/common/sourcemaps/uploading/esbuild.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ To upload source maps you have to configure an [Organization Auth Token](https:/
4242

4343
Alternatively, you can also use a [User Auth Token](https://sentry.io/orgredirect/organizations/:orgslug/settings/account/api/auth-tokens/), with the "Project: Read & Write" and "Release: Admin" permissions.
4444

45-
Auth tokens can be passed to the plugin explicitly with the `authToken` option, with a `SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file in the working directory when building your project.
45+
Auth tokens can be passed to the plugin explicitly with the `authToken` option, with a `SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file (don't forget to add it to your `.gitignore` file, as this is sensitive data) in the working directory when building your project.
4646
We recommend you add the auth token to your CI/CD environment as an environment variable.
4747

4848
Learn more about configuring the plugin in our [Sentry esbuild Plugin documentation](https://www.npmjs.com/package/@sentry/esbuild-plugin).
@@ -55,7 +55,6 @@ SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
5555

5656
Example:
5757

58-
5958
```javascript {filename:esbuild.config.js}
6059
const { sentryEsbuildPlugin } = require("@sentry/esbuild-plugin");
6160

@@ -74,8 +73,8 @@ require("esbuild").build({
7473

7574
<Alert>
7675
Generating sourcemaps may expose them to the public, potentially causing your
77-
source code to be leaked. You can prevent this by configuring your server to deny access to `.js.map` files, or by
78-
using [Sentry Esbuild Plugin's
76+
source code to be leaked. You can prevent this by configuring your server to
77+
deny access to `.js.map` files, or by using [Sentry Esbuild Plugin's
7978
`sourcemaps.filesToDeleteAfterUpload`](https://www.npmjs.com/package/@sentry/esbuild-plugin#sourcemapsfilestodeleteafterupload)
8079
option to delete source maps after they've been uploaded to Sentry.
8180
</Alert>

docs/platforms/javascript/common/sourcemaps/uploading/rollup.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ To upload source maps you have to configure an [Organization Auth Token](https:/
4242

4343
Alternatively, you can also use a [User Auth Token](https://sentry.io/orgredirect/organizations/:orgslug/settings/account/api/auth-tokens/), with the "Project: Read & Write" and "Release: Admin" permissions.
4444

45-
Auth tokens can be passed to the plugin explicitly with the `authToken` option, with a `SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file in the working directory when building your project.
45+
Auth tokens can be passed to the plugin explicitly with the `authToken` option, with a `SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file (don't forget to add it to your `.gitignore` file, as this is sensitive data) in the working directory when building your project.
4646
We recommend you add the auth token to your CI/CD environment as an environment variable.
4747

4848
Learn more about configuring the plugin in our [Sentry Rollup Plugin documentation](https://www.npmjs.com/package/@sentry/rollup-plugin).
@@ -55,7 +55,6 @@ SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
5555

5656
Example:
5757

58-
5958
```javascript {filename:rollup.config.js}
6059
import { sentryRollupPlugin } from "@sentry/rollup-plugin";
6160

@@ -76,8 +75,8 @@ export default {
7675

7776
<Alert>
7877
Generating sourcemaps may expose them to the public, potentially causing your
79-
source code to be leaked. You can prevent this by configuring your server to deny access to `.js.map` files, or by
80-
using [Sentry Rollup Plugin's
78+
source code to be leaked. You can prevent this by configuring your server to
79+
deny access to `.js.map` files, or by using [Sentry Rollup Plugin's
8180
`sourcemaps.filesToDeleteAfterUpload`](https://www.npmjs.com/package/@sentry/rollup-plugin#sourcemapsfilestodeleteafterupload)
8281
option to delete source maps after they've been uploaded to Sentry.
8382
</Alert>

docs/platforms/javascript/common/sourcemaps/uploading/vite.mdx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ sidebar_order: 3
55
---
66

77
<Note>
8-
This guide assumes you're using a Sentry **SDK version `7.47.0` or higher**. If you're on an older version and you want to upload source maps, we recommend upgrading your SDK to the newest version.
8+
This guide assumes you're using a Sentry **SDK version `7.47.0` or higher**.
9+
If you're on an older version and you want to upload source maps, we recommend
10+
upgrading your SDK to the newest version.
911
</Note>
1012

1113
You can use the Sentry Vite plugin to automatically create releases and upload source maps to Sentry when bundling your app.
@@ -40,7 +42,7 @@ To upload source maps you have to configure an [Organization Auth Token](https:/
4042

4143
Alternatively, you can also use a [User Auth Token](https://sentry.io/orgredirect/organizations/:orgslug/settings/account/api/auth-tokens/), with the "Project: Read & Write" and "Release: Admin" permissions.
4244

43-
Auth tokens can be passed to the plugin explicitly with the `authToken` option, with a `SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file in the working directory when building your project.
45+
Auth tokens can be passed to the plugin explicitly with the `authToken` option, with a `SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file (don't forget to add it to your `.gitignore` file, as this is sensitive data) in the working directory when building your project.
4446
We recommend you add the auth token to your CI/CD environment as an environment variable.
4547

4648
Learn more about configuring the plugin in our [Sentry Vite Plugin documentation](https://www.npmjs.com/package/@sentry/vite-plugin).
@@ -53,7 +55,6 @@ SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
5355

5456
Example:
5557

56-
5758
```javascript {filename:vite.config.js}
5859
import { defineConfig } from "vite";
5960
import { sentryVitePlugin } from "@sentry/vite-plugin";
@@ -74,9 +75,11 @@ export default defineConfig({
7475
```
7576

7677
<Alert>
77-
Generating sourcemaps may expose them to the public, potentially causing your source code to be leaked. You can prevent this by configuring your server to deny access to `.js.map` files, or by
78-
using [Sentry Vite Plugin's
79-
`sourcemaps.filesToDeleteAfterUpload`](https://www.npmjs.com/package/@sentry/vite-plugin#sourcemapsfilestodeleteafterupload) option to delete source maps after they've been uploaded to Sentry.
78+
Generating sourcemaps may expose them to the public, potentially causing your
79+
source code to be leaked. You can prevent this by configuring your server to
80+
deny access to `.js.map` files, or by using [Sentry Vite Plugin's
81+
`sourcemaps.filesToDeleteAfterUpload`](https://www.npmjs.com/package/@sentry/vite-plugin#sourcemapsfilestodeleteafterupload)
82+
option to delete source maps after they've been uploaded to Sentry.
8083
</Alert>
8184

8285
<Note>

docs/platforms/javascript/common/sourcemaps/uploading/webpack.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ To upload source maps you have to configure an [Organization Auth Token](https:/
4141

4242
Alternatively, you can also use a [User Auth Token](https://sentry.io/orgredirect/organizations/:orgslug/settings/account/api/auth-tokens/), with the "Project: Read & Write" and "Release: Admin" permissions.
4343

44-
Auth tokens can be passed to the plugin explicitly with the `authToken` option, with a `SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file in the working directory when building your project.
44+
Auth tokens can be passed to the plugin explicitly with the `authToken` option, with a `SENTRY_AUTH_TOKEN` environment variable, or with an `.env.sentry-build-plugin` file (don't forget to add it to your `.gitignore` file, as this is sensitive data) in the working directory when building your project.
4545
We recommend you add the auth token to your CI/CD environment as an environment variable.
4646

4747
Learn more about configuring the plugin in our [Sentry webpack plugin documentation](https://www.npmjs.com/package/@sentry/webpack-plugin).
@@ -54,7 +54,6 @@ SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
5454

5555
<PlatformSection notSupported={["javascript.gatsby"]}>
5656

57-
5857
And the following webpack config:
5958

6059
```javascript {filename:webpack.config.js}
@@ -80,7 +79,6 @@ module.exports = {
8079

8180
Add the following to your `gatsby-node.js` file:
8281

83-
8482
```javascript {filename:gatsby-node.js}
8583
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");
8684

@@ -101,8 +99,8 @@ exports.onCreateWebpackConfig = ({ actions }) => {
10199

102100
<Alert>
103101
Generating sourcemaps may expose them to the public, potentially causing your
104-
source code to be leaked. You can prevent this by configuring your server to deny access to `.js.map` files, or by
105-
using [Sentry Webpack Plugin's
102+
source code to be leaked. You can prevent this by configuring your server to
103+
deny access to `.js.map` files, or by using [Sentry Webpack Plugin's
106104
`sourcemaps.filesToDeleteAfterUpload`](https://www.npmjs.com/package/@sentry/webpack-plugin#sourcemapsfilestodeleteafterupload)
107105
option to delete source maps after they've been uploaded to Sentry.
108106
</Alert>

0 commit comments

Comments
 (0)