From 7bb9d01013036737711bba51d2a756a29d8493cd Mon Sep 17 00:00:00 2001 From: Sigrid Huemer <32902192+s1gr1d@users.noreply.github.com> Date: Mon, 6 May 2024 14:27:16 +0200 Subject: [PATCH] feat(onboarding): change serverless v8 onboarding (#70326) Updates the code snippets to show the new serverless packages for aws and gcp. --- static/app/utils/gettingStartedDocs/node.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/static/app/utils/gettingStartedDocs/node.ts b/static/app/utils/gettingStartedDocs/node.ts index a65ebc67b65b52..de39a7fd19fd6f 100644 --- a/static/app/utils/gettingStartedDocs/node.ts +++ b/static/app/utils/gettingStartedDocs/node.ts @@ -126,8 +126,10 @@ export function getDefaultServerlessImports({ library: `google-cloud-serverless` | `aws-serverless`; productSelection: ProductSelectionMap; }) { - const imports: string[] = getImport(library); - + const imports: string[] = [ + `// You can also use ESM \`import * as Sentry from "@sentry/${library}"\` instead of \`require\``, + `const Sentry = require("@sentry/${library}");`, + ]; if (productSelection.profiling) { imports.push( `const { nodeProfilingIntegration } = require("@sentry/profiling-node");`