Details for the Codecov NextJS (Webpack) plugin.

// next.config.mjs
import { codecovNextJSWebpackPlugin } from "@codecov/nextjs-webpack-plugin";

export default {
webpack: (config, options) => {
config.plugins.push(
codecovNextJSWebpackPlugin({
enableBundleAnalysis: true,
bundleName: "example-nextjs-webpack-bundle",
uploadToken: process.env.CODECOV_TOKEN,
webpack: options.webpack,
}),
);

return config;
},
};

Options for list of options.

  • Parameters

    • options: NextPluginOptions
      • webpack

        pass in the webpack instance from the NextJS configuration.

    Returns WebpackPluginInstance