Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ module.exports = {
{
resolve: "gatsby-plugin-webpack-bundle-analyser-v2",
options: {
disable: true
devMode: true,
disable: process.env.NODE_ENV !== "production",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be not better if it is enabled for development also because we want analyzer to run for dev mode too to check various things like the bundle size and all?

Comment on lines +37 to +38
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both will contradicts to each other

analyzerMode: "server",
reportFilename: "./report.html",
openAnalyzer: true,
analyzerPort: "8888",
analyzerHost: "http://localhost",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the build is failing because the webpack bundle analyzer is configured with analyzerHost: "http://localhost", but this option expects only the hostname (for example, "localhost") and not a full URL.
After modifying this, the build started working as expected.

defaultSizes: "gzip"
}
},
{
Expand Down
3 changes: 2 additions & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"env-cmd": "^10.1.0",
"eslint": "^8.46.0",
"eslint-plugin-react": "^7.37.3",
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.30",
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.32",
"gh-pages": "^6.0.0",
"husky": "^8.0.3",
"rimraf": "^5.0.1",
Expand Down
Loading