From 3ab2f0131c491d24b0200d9883c52c7ada86b8d9 Mon Sep 17 00:00:00 2001 From: Norbert Schuler Date: Wed, 15 Dec 2021 22:25:49 +0100 Subject: [PATCH] changed source maps generation --- next.config.js | 8 ++++---- package-lock.json | 12 ------------ package.json | 1 - 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/next.config.js b/next.config.js index 9cad9c62..b538ae0d 100644 --- a/next.config.js +++ b/next.config.js @@ -1,7 +1,4 @@ const withPlugins = require("next-compose-plugins"); -// Use the hidden-source-map option when you don't want the source maps to be -// publicly available on the servers, only to the error reporting -const withSourceMaps = require("@zeit/next-source-maps")(); const withBundleAnalyzer = require("@next/bundle-analyzer")({ enabled: process.env.ANALYZE === "true", }); @@ -16,6 +13,7 @@ const { SENTRY_PROJECT, SENTRY_AUTH_TOKEN, NODE_ENV, + VERCEL_GIT_COMMIT_SHA, VERCEL_GITHUB_COMMIT_SHA, VERCEL_GITLAB_COMMIT_SHA, VERCEL_BITBUCKET_COMMIT_SHA, @@ -23,6 +21,7 @@ const { } = process.env; const COMMIT_SHA = + VERCEL_GIT_COMMIT_SHA || VERCEL_GITHUB_COMMIT_SHA || VERCEL_GITLAB_COMMIT_SHA || VERCEL_BITBUCKET_COMMIT_SHA || @@ -46,7 +45,8 @@ if (process.env.NEXT_PUBLIC_VERCEL_ENV === "preview") { const hasAssetPrefix = process.env.ASSET_PREFIX !== "" && process.env.ASSET_PREFIX !== undefined; -module.exports = withPlugins([[withBundleAnalyzer], [withSourceMaps]], { +module.exports = withPlugins([[withBundleAnalyzer]], { + productionBrowserSourceMaps: true, serverRuntimeConfig: { rootDir: __dirname, }, diff --git a/package-lock.json b/package-lock.json index 6bd3f124..e36221da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,6 @@ "@sentry/webpack-plugin": "^1.14.2", "@stripe/react-stripe-js": "^1.4.0", "@stripe/stripe-js": "^1.13.2", - "@zeit/next-source-maps": "0.0.4-canary.1", "axios": "^0.21.1", "dom-to-image": "^2.6.0", "geocoder-arcgis": "^2.0.5", @@ -1896,12 +1895,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@zeit/next-source-maps": { - "version": "0.0.4-canary.1", - "resolved": "https://registry.npmjs.org/@zeit/next-source-maps/-/next-source-maps-0.0.4-canary.1.tgz", - "integrity": "sha512-SPQCLs7ToaqzQnqXqGSCoL7KTlnOAao+1F5hy7Hkuq85TjHsUC3eeLsmVrBIraIhXG/ARHmZ0JHOesPDtBfpzw==", - "deprecated": "Next.js now has built-in support for Source Maps: https://nextjs.org/docs/advanced-features/source-maps" - }, "node_modules/abortcontroller-polyfill": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz", @@ -9673,11 +9666,6 @@ "eslint-visitor-keys": "^2.0.0" } }, - "@zeit/next-source-maps": { - "version": "0.0.4-canary.1", - "resolved": "https://registry.npmjs.org/@zeit/next-source-maps/-/next-source-maps-0.0.4-canary.1.tgz", - "integrity": "sha512-SPQCLs7ToaqzQnqXqGSCoL7KTlnOAao+1F5hy7Hkuq85TjHsUC3eeLsmVrBIraIhXG/ARHmZ0JHOesPDtBfpzw==" - }, "abortcontroller-polyfill": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz", diff --git a/package.json b/package.json index 560e7943..775de245 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "@sentry/webpack-plugin": "^1.14.2", "@stripe/react-stripe-js": "^1.4.0", "@stripe/stripe-js": "^1.13.2", - "@zeit/next-source-maps": "0.0.4-canary.1", "axios": "^0.21.1", "dom-to-image": "^2.6.0", "geocoder-arcgis": "^2.0.5",