Skip to content

Commit 7c57729

Browse files
authored
chore: Add codecov bundle analysis to docs repo (#9204)
1 parent 49a7db6 commit 7c57729

File tree

3 files changed

+61
-10
lines changed

3 files changed

+61
-10
lines changed

next.config.js

+13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const createMDX = require('@next/mdx');
22
const remarkPrism = require('remark-prism');
3+
const {codecovWebpackPlugin} = require('@codecov/webpack-plugin');
34

45
/** @type {import('next').NextConfig} */
56
const nextConfig = {
@@ -20,6 +21,18 @@ const nextConfig = {
2021
serverComponentsExternalPackages: ['rehype-preset-minify'],
2122
},
2223

24+
webpack: (config, _options) => {
25+
config.plugins.push(
26+
codecovWebpackPlugin({
27+
enableBundleAnalysis: typeof process.env.CODECOV_TOKEN === 'string',
28+
bundleName: 'sentry-docs',
29+
uploadToken: process.env.CODECOV_TOKEN,
30+
})
31+
);
32+
33+
return config;
34+
},
35+
2336
redirects() {
2437
return [
2538
{

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
},
7474
"devDependencies": {
7575
"@babel/preset-typescript": "^7.15.0",
76+
"@codecov/webpack-plugin": "^0.0.1-beta.1",
7677
"@spotlightjs/spotlight": "^1.2.10",
7778
"@tailwindcss/forms": "^0.5.7",
7879
"@tailwindcss/typography": "^0.5.10",

yarn.lock

+47-10
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,23 @@
520520
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
521521
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
522522

523+
"@codecov/bundler-plugin-core@^0.0.1-beta.1":
524+
version "0.0.1-beta.1"
525+
resolved "https://registry.yarnpkg.com/@codecov/bundler-plugin-core/-/bundler-plugin-core-0.0.1-beta.1.tgz#d84d83e59ff1670b350ed6cf97900643c567daef"
526+
integrity sha512-58u6JPrfd7uUKH4mBpczJgbzd6Bws6NvmA9rSCLZXMwd9YWnFSqF8h/ZLJKN4Hp7y8lArl81P8BZUsoQMoO6Wg==
527+
dependencies:
528+
chalk "4.1.2"
529+
semver "^7.5.4"
530+
unplugin "^1.6.0"
531+
zod "^3.22.4"
532+
533+
"@codecov/webpack-plugin@^0.0.1-beta.1":
534+
version "0.0.1-beta.1"
535+
resolved "https://registry.yarnpkg.com/@codecov/webpack-plugin/-/webpack-plugin-0.0.1-beta.1.tgz#d0be931f6c4425279c817eb6243c12a3ba83aa49"
536+
integrity sha512-Llzh1kWNN3hAMFjy30imMiIXeF4XWABtuOP7/2rtYcHL3AdWY9iiuGysoXttLjVwpqczjsUm1HgN2vJy/zuwGg==
537+
dependencies:
538+
"@codecov/bundler-plugin-core" "^0.0.1-beta.1"
539+
523540
"@cspotcode/source-map-support@^0.8.0":
524541
version "0.8.1"
525542
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1"
@@ -2786,7 +2803,7 @@ acorn@^7.1.1:
27862803
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
27872804
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
27882805

2789-
acorn@^8.0.0, acorn@^8.1.0, acorn@^8.2.4, acorn@^8.4.1, acorn@^8.8.1, acorn@^8.9.0:
2806+
acorn@^8.0.0, acorn@^8.1.0, acorn@^8.11.3, acorn@^8.2.4, acorn@^8.4.1, acorn@^8.8.1, acorn@^8.9.0:
27902807
version "8.11.3"
27912808
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a"
27922809
integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==
@@ -3311,6 +3328,14 @@ [email protected]:
33113328
ansi-styles "^4.1.0"
33123329
supports-color "^7.1.0"
33133330

3331+
[email protected], chalk@^4.0.0, chalk@^4.1.2:
3332+
version "4.1.2"
3333+
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
3334+
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
3335+
dependencies:
3336+
ansi-styles "^4.1.0"
3337+
supports-color "^7.1.0"
3338+
33143339
chalk@^2.4.2:
33153340
version "2.4.2"
33163341
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
@@ -3320,14 +3345,6 @@ chalk@^2.4.2:
33203345
escape-string-regexp "^1.0.5"
33213346
supports-color "^5.3.0"
33223347

3323-
chalk@^4.0.0, chalk@^4.1.2:
3324-
version "4.1.2"
3325-
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
3326-
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
3327-
dependencies:
3328-
ansi-styles "^4.1.0"
3329-
supports-color "^7.1.0"
3330-
33313348
char-regex@^1.0.2:
33323349
version "1.0.2"
33333350
resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf"
@@ -9964,6 +9981,16 @@ universalify@^0.2.0:
99649981
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0"
99659982
integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==
99669983

9984+
unplugin@^1.6.0:
9985+
version "1.7.1"
9986+
resolved "https://registry.yarnpkg.com/unplugin/-/unplugin-1.7.1.tgz#009571e3128640f4e327f33680d2db27afaf1e11"
9987+
integrity sha512-JqzORDAPxxs8ErLV4x+LL7bk5pk3YlcWqpSNsIkAZj972KzFZLClc/ekppahKkOczGkwIG6ElFgdOgOlK4tXZw==
9988+
dependencies:
9989+
acorn "^8.11.3"
9990+
chokidar "^3.5.3"
9991+
webpack-sources "^3.2.3"
9992+
webpack-virtual-modules "^0.6.1"
9993+
99679994
update-browserslist-db@^1.0.13:
99689995
version "1.0.13"
99699996
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4"
@@ -10178,11 +10205,16 @@ webidl-conversions@^7.0.0:
1017810205
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a"
1017910206
integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==
1018010207

10181-
"webpack-sources@^2.0.0 || ^3.0.0":
10208+
"webpack-sources@^2.0.0 || ^3.0.0", webpack-sources@^3.2.3:
1018210209
version "3.2.3"
1018310210
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"
1018410211
integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==
1018510212

10213+
webpack-virtual-modules@^0.6.1:
10214+
version "0.6.1"
10215+
resolved "https://registry.yarnpkg.com/webpack-virtual-modules/-/webpack-virtual-modules-0.6.1.tgz#ac6fdb9c5adb8caecd82ec241c9631b7a3681b6f"
10216+
integrity sha512-poXpCylU7ExuvZK8z+On3kX+S8o/2dQ/SVYueKA0D4WEMXROXgY8Ez50/bQEUmvoSMMrWcrJqCHuhAbsiwg7Dg==
10217+
1018610218
whatwg-encoding@^1.0.5:
1018710219
version "1.0.5"
1018810220
resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0"
@@ -10398,6 +10430,11 @@ yocto-queue@^0.1.0:
1039810430
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
1039910431
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
1040010432

10433+
zod@^3.22.4:
10434+
version "3.22.4"
10435+
resolved "https://registry.yarnpkg.com/zod/-/zod-3.22.4.tgz#f31c3a9386f61b1f228af56faa9255e845cf3fff"
10436+
integrity sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==
10437+
1040110438
zwitch@^2.0.0:
1040210439
version "2.0.4"
1040310440
resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-2.0.4.tgz#c827d4b0acb76fc3e685a4c6ec2902d51070e9d7"

0 commit comments

Comments
 (0)