@@ -145,11 +145,12 @@ sourcemaps) within Sentry. This removes the requirement for them to be
145
145
web-accessible, and also removes any inconsistency that could come from
146
146
network flakiness (on either your end, or Sentry's end).
147
147
148
- You can either interact with the API directly or you can upload sourcemaps
149
- with the help of the Sentry CLI (:ref: `upload-sourcemaps-with-cli `).
148
+ You can either interact with the API directly, upload sourcemaps
149
+ with the help of the Sentry CLI (:ref: `upload-sourcemaps-with-cli `)
150
+ or you can use ``sentry-webpack-plugin ``.
150
151
151
- * Start by creating a new authentication token under **[Account] > API **.
152
- * Ensure you you have ``project:write `` selected under scopes.
152
+ * Start by creating a new authentication token under ` **[Account] > API** < https://sentry.io/api/ >`_ .
153
+ * Ensure you have ``project:write `` selected under scopes.
153
154
* You'll use the Authorization header with the value of ``Bearer: {TOKEN} ``
154
155
with API requests.
155
156
@@ -302,6 +303,35 @@ the ``--ext`` parameter.
302
303
* Make sure that your minified files you have on your servers
303
304
actually have references to your files.
304
305
306
+ Using Sentry Webpack Plugin
307
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
308
+
309
+ Another way to manage releases and sourcemaps on Sentry, is to use the Sentry Webpack Plugin.
310
+
311
+ * Start by creating a new authentication token under `**[Account] > API** <https://sentry.io/api/ >`_.
312
+ * Ensure you have ``project:write `` selected under scopes.
313
+ * Install ``@sentry/webpack-plugin `` using ``npm ``
314
+ * Create ``.sentryclirc `` file with necessary config (see Sentry Webpack Plugin docs below)
315
+ * Update your ``webpack.config.json ``
316
+
317
+ ::
318
+
319
+ const SentryPlugin = require('@sentry/webpack-plugin');
320
+
321
+ module.exports = {
322
+ // ... other config above ...
323
+ plugins: [
324
+ new SentryPlugin({
325
+ release: process.env.RELEASE,
326
+ include: './dist',
327
+ ignore: ['node_modules', 'webpack.config.js'],
328
+ })
329
+ ]
330
+ };
331
+
332
+
333
+ You can take a look at `Sentry Webpack Plugin documentation <https://github.com/getsentry/sentry-webpack-plugin >`_
334
+ for more information on how to configure the plugin.
305
335
306
336
.. sentry :edition :: hosted
307
337
0 commit comments