From c45b1abede4c86a463d2ca8c76597af7e057f62e Mon Sep 17 00:00:00 2001 From: Rishabh Date: Mon, 7 Jun 2021 15:32:55 +0530 Subject: [PATCH] Added source map explorer for analyzing builds no refs `yarn analyze` now launches source map explorer which analyzes the local bundle, helping in keeping Portal size as small as possible. --- ghost/portal/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ghost/portal/package.json b/ghost/portal/package.json index 4b87b4175f..894024c320 100644 --- a/ghost/portal/package.json +++ b/ghost/portal/package.json @@ -38,6 +38,7 @@ "preship": "yarn lint", "ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn publish && git push ${GHOST_UPSTREAM:-upstream} main --follow-tags; fi", "posttest": "yarn lint", + "analyze": "source-map-explorer 'build/static/js/*.js'", "prepublishOnly": "yarn build" }, "eslintConfig": { @@ -69,6 +70,7 @@ "ora": "^5.4.0", "rewire": "5.0.0", "serve-handler": "^6.1.3", + "source-map-explorer": "^2.5.2", "webpack-cli": "3.3.12" } }