File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -58,3 +58,8 @@ features:
5858 rm .github/build/spreadsheet.csv
5959
6060.PHONY : setup build site site-full clean site-fast lint features
61+
62+ # # Analyze webpack bundle with FCP optimization
63+ site-analyze :
64+ @echo " 🏗️ Building site with webpack bundle analyzer..."
65+ ANALYZE_BUNDLE=true npm run build
Original file line number Diff line number Diff line change @@ -60,12 +60,17 @@ module.exports = {
6060 mergeCachingHeaders : true ,
6161 } ,
6262 } ,
63- {
64- resolve : "gatsby-plugin-webpack-bundle-analyser-v2" ,
65- options : {
66- disable : true ,
67- } ,
68- } ,
63+ ...( process . env . ANALYZE_BUNDLE
64+ ? [
65+ {
66+ resolve : "gatsby-plugin-webpack-bundle-analyser-v2" ,
67+ options : {
68+ analyzerMode : "server" ,
69+ openAnalyzer : true ,
70+ } ,
71+ } ,
72+ ]
73+ : [ ] ) ,
6974 {
7075 resolve : "gatsby-plugin-sitemap" ,
7176 options : {
You can’t perform that action at this time.
0 commit comments