Skip to content

Commit

Permalink
doc(next-plugin): Explicit fn args
Browse files Browse the repository at this point in the history
  • Loading branch information
vio committed Jun 23, 2024
1 parent ee4608f commit 95e8c14
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions packages/next-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,29 @@ See [bundle-stats-webpack-plugin options](https://github.com/relative-ci/bundle-

```js
// In your next.config.js
const withBundleStats = require('next-plugin-bundle-stats');
const createBundleStatsPlugin = require('next-plugin-bundle-stats');

module.exports = withBundleStats();
const withBundleStatsPlugin = createBundleStatsPlugin();

/** @type {import('next').NextConfig} */
const nextConfig = {};

module.exports = withBundleStatsPlugin(nextConfig);
```

or with custom options:
```js
// In your next.config.js
const withBundleStats = require('next-plugin-bundle-stats');
const createBundleStatsPlugin = require('next-plugin-bundle-stats');

module.exports = withBundleStats({
const withBundleStatsPlugin = createBundleStatsPlugin({
outDir: '../artifacts'
});

/** @type {import('next').NextConfig} */
const nextConfig = {};

module.exports = withBundleStatsPlugin(nextConfig);
```

## Other packages
Expand Down

0 comments on commit 95e8c14

Please sign in to comment.