Skip to content

Commit

Permalink
Add Codecov bundler plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
hazal-karakus committed Dec 12, 2024
1 parent 8d8a1cc commit 39412eb
Show file tree
Hide file tree
Showing 3 changed files with 422 additions and 0 deletions.
8 changes: 8 additions & 0 deletions react/config-overrides.js.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const SentryWebpackPlugin = require('@sentry/webpack-plugin');
const reactsourceMapPlugin = require('@acemarke/react-prod-sourcemaps');
const { codecovWebpackPlugin } = require("@codecov/webpack-plugin");

module.exports = function override(config, env) {
//do stuff with the webpack config...
Expand All @@ -21,5 +22,12 @@ module.exports = function override(config, env) {
reactComponentAnnotation: {enabled:true},
})
);
config.plugins.push(
codecovWebpackPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: "example-webpack-bundle",
uploadToken: process.env.CODECOV_TOKEN,
})
);
return config;
};
Loading

0 comments on commit 39412eb

Please sign in to comment.