Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Upgrade codecov bundle analysis plugins to 1.0.0 #11306

Merged
merged 3 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion apps/changelog/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {withSentryConfig} from '@sentry/nextjs';
import WebpackHookPlugin from 'webpack-hook-plugin';
import {codecovNextJSWebpackPlugin} from '@codecov/nextjs-webpack-plugin';

/** @type {import('next').NextConfig} */
const nextConfig = {
Expand All @@ -8,7 +9,7 @@ const nextConfig = {
ignoreDuringBuilds: true,
},
transpilePackages: ['next-mdx-remote'],
webpack: (config, {dev, nextRuntime}) => {
webpack: (config, {dev, nextRuntime, webpack}) => {
if (dev && nextRuntime === 'nodejs') {
config.plugins.push(
new WebpackHookPlugin({
Expand All @@ -17,6 +18,15 @@ const nextConfig = {
);
}

config.plugins.push(
codecovNextJSWebpackPlugin({
enableBundleAnalysis: typeof process.env.CODECOV_TOKEN === 'string',
bundleName: 'sentry-changelog',
uploadToken: process.env.CODECOV_TOKEN,
webpack,
})
);

return config;
},
async redirects() {
Expand Down
3 changes: 2 additions & 1 deletion apps/changelog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-toolbar": "^1.0.4",
"@radix-ui/themes": "^2.0.3",
"@sentry/nextjs": "8.20.0",
"@sentry/nextjs": "8.29.0",
"@spotlightjs/spotlight": "^2.1.1",
"next": "^15.0.0-canary.83",
"next-auth": "^4.24.5",
Expand All @@ -41,6 +41,7 @@
"webpack-hook-plugin": "^1.0.7"
},
"devDependencies": {
"@codecov/nextjs-webpack-plugin": "^1.0.0",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.10",
"@types/node": "^20",
Expand Down
7 changes: 4 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const {redirects} = require('./redirects.js');

const {codecovWebpackPlugin} = require('@codecov/webpack-plugin');
const {codecovNextJSWebpackPlugin} = require('@codecov/nextjs-webpack-plugin');
const {withSentryConfig} = require('@sentry/nextjs');

const outputFileTracingExcludes = process.env.NEXT_PUBLIC_DEVELOPER_DOCS
Expand Down Expand Up @@ -42,12 +42,13 @@ const nextConfig = {
outputFileTracingExcludes,
},

webpack: (config, _options) => {
webpack: (config, options) => {
config.plugins.push(
codecovWebpackPlugin({
codecovNextJSWebpackPlugin({
enableBundleAnalysis: typeof process.env.CODECOV_TOKEN === 'string',
bundleName: 'sentry-docs',
uploadToken: process.env.CODECOV_TOKEN,
webpack: options.webpack,
})
);

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@radix-ui/react-toolbar": "^1.0.4",
"@radix-ui/themes": "^2.0.3",
"@sentry-internal/global-search": "^1.1.0",
"@sentry/nextjs": "8.20.0",
"@sentry/nextjs": "8.29.0",
"@types/mdx": "^2.0.9",
"algoliasearch": "^4.23.3",
"esbuild": "^0.19.8",
Expand Down Expand Up @@ -105,7 +105,7 @@
},
"devDependencies": {
"@babel/preset-typescript": "^7.15.0",
"@codecov/webpack-plugin": "^0.0.1-beta.2",
"@codecov/nextjs-webpack-plugin": "^1.0.0",
"@spotlightjs/spotlight": "^2.0.0-alpha.1",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.10",
Expand Down
Loading
Loading