Skip to content

Commit

Permalink
Update bundle analyzer dependency and output (#42797)
Browse files Browse the repository at this point in the history
* Update `webpack-bundle-analyzer` to 4.7.0
* Change the output file paths of bundle analyzing results to
`./next/analyze/<nodejs|edge|client>.html`
  • Loading branch information
huozhi committed Nov 12, 2022
1 parent 5e965bc commit b180bec
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -208,7 +208,7 @@
"typescript": "4.8.2",
"wait-port": "0.2.2",
"webpack": "5.74.0",
"webpack-bundle-analyzer": "4.3.0"
"webpack-bundle-analyzer": "4.7.0"
},
"resolutions": {
"browserslist": "4.20.2",
Expand Down
8 changes: 5 additions & 3 deletions packages/next-bundle-analyzer/index.js
Expand Up @@ -9,9 +9,11 @@ module.exports =
new BundleAnalyzerPlugin({
analyzerMode: 'static',
openAnalyzer,
reportFilename: options.isServer
? '../analyze/server.html'
: './analyze/client.html',
reportFilename: !options.nextRuntime
? `./analyze/client.html`
: `../${options.nextRuntime === 'nodejs' ? '../' : ''}analyze/${
options.nextRuntime
}.html`,
})
)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
Expand Up @@ -9,6 +9,6 @@
"directory": "packages/next-bundle-analyzer"
},
"dependencies": {
"webpack-bundle-analyzer": "4.3.0"
"webpack-bundle-analyzer": "4.7.0"
}
}
31 changes: 11 additions & 20 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b180bec

Please sign in to comment.