Skip to content
This repository was archived by the owner on Feb 14, 2022. It is now read-only.

Commit ca418a9

Browse files
committed
Add bundle analyzer
1 parent 974712e commit ca418a9

File tree

3 files changed

+582
-2
lines changed

3 files changed

+582
-2
lines changed

next.config.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
const { createLoader } = require('simple-functional-loader')
2+
const withBundleAnalyzer = require('@next/bundle-analyzer')({
3+
enabled: process.env.ANALYZE === 'true',
4+
})
25

3-
module.exports = {
6+
module.exports = withBundleAnalyzer({
47
pageExtensions: ['js', 'jsx', 'mdx'],
58
webpack: (config, options) => {
69
config.module.rules.push({
@@ -59,4 +62,4 @@ module.exports = {
5962

6063
return config
6164
},
62-
}
65+
})

0 commit comments

Comments
 (0)