From 16cf12355e0f0b0aa4d3a312124a36d289730d7f Mon Sep 17 00:00:00 2001 From: James Cahill Date: Sun, 25 Jun 2023 12:31:40 +0100 Subject: [PATCH] (gatsby): Disable sourcemaps to save on hosting space iGEM only gives us 10MB for our site. Disabling sourcemaps currently saves us ~1.6MB --- gatsby-config.ts | 1 + package-lock.json | 23 +++++++++++++++++++++++ package.json | 1 + 3 files changed, 25 insertions(+) diff --git a/gatsby-config.ts b/gatsby-config.ts index 5dc2fb2f..febc37a4 100644 --- a/gatsby-config.ts +++ b/gatsby-config.ts @@ -32,6 +32,7 @@ const config: GatsbyConfig = { `gatsby-plugin-image`, `gatsby-plugin-sharp`, `gatsby-transformer-sharp`, // Needed for dynamic images + `gatsby-plugin-no-sourcemaps`, ], }; diff --git a/package-lock.json b/package-lock.json index 52dad02f..f882639f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "bootstrap": "^5.3.0", "gatsby": "^5.9.1", "gatsby-plugin-image": "^3.11.0", + "gatsby-plugin-no-sourcemaps": "^5.11.0", "gatsby-plugin-remote-images": "^3.6.6", "gatsby-plugin-sharp": "^5.11.0", "gatsby-source-filesystem": "^5.11.0", @@ -9355,6 +9356,20 @@ } } }, + "node_modules/gatsby-plugin-no-sourcemaps": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/gatsby-plugin-no-sourcemaps/-/gatsby-plugin-no-sourcemaps-5.11.0.tgz", + "integrity": "sha512-OZBt3zdcWlYPtqkhXO9+MwcBhSXLaMJeSvNoOJn0ET3U2k/dTRllVW5LQprfPbla6AmWDGaXqnjB9QNGFypj9w==", + "dependencies": { + "@babel/runtime": "^7.20.13" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "gatsby": "^5.0.0-next" + } + }, "node_modules/gatsby-plugin-page-creator": { "version": "5.11.0", "resolved": "https://registry.npmjs.org/gatsby-plugin-page-creator/-/gatsby-plugin-page-creator-5.11.0.tgz", @@ -23526,6 +23541,14 @@ "prop-types": "^15.8.1" } }, + "gatsby-plugin-no-sourcemaps": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/gatsby-plugin-no-sourcemaps/-/gatsby-plugin-no-sourcemaps-5.11.0.tgz", + "integrity": "sha512-OZBt3zdcWlYPtqkhXO9+MwcBhSXLaMJeSvNoOJn0ET3U2k/dTRllVW5LQprfPbla6AmWDGaXqnjB9QNGFypj9w==", + "requires": { + "@babel/runtime": "^7.20.13" + } + }, "gatsby-plugin-page-creator": { "version": "5.11.0", "resolved": "https://registry.npmjs.org/gatsby-plugin-page-creator/-/gatsby-plugin-page-creator-5.11.0.tgz", diff --git a/package.json b/package.json index f1686c91..82da181a 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "bootstrap": "^5.3.0", "gatsby": "^5.9.1", "gatsby-plugin-image": "^3.11.0", + "gatsby-plugin-no-sourcemaps": "^5.11.0", "gatsby-plugin-remote-images": "^3.6.6", "gatsby-plugin-sharp": "^5.11.0", "gatsby-source-filesystem": "^5.11.0",