diff --git a/src/nextjs/nextjs-wizard.ts b/src/nextjs/nextjs-wizard.ts index bb2e7c32..61b62aef 100644 --- a/src/nextjs/nextjs-wizard.ts +++ b/src/nextjs/nextjs-wizard.ts @@ -118,6 +118,8 @@ export async function runNextjsWizard(options: WizardOptions): Promise { const sentryWebpackOptionsTemplate = getNextjsWebpackPluginOptionsTemplate( selectedProject.organization.slug, selectedProject.slug, + selfHosted, + sentryUrl, ); const sentryBuildOptionsTemplate = getNextjsSentryBuildOptionsTemplate(); diff --git a/src/nextjs/templates.ts b/src/nextjs/templates.ts index 719bca5b..5327cbf2 100644 --- a/src/nextjs/templates.ts +++ b/src/nextjs/templates.ts @@ -1,6 +1,8 @@ export function getNextjsWebpackPluginOptionsTemplate( orgSlug: string, projectSlug: string, + selfHosted: boolean, + url: string, ): string { return `{ // For all available options, see: @@ -8,7 +10,7 @@ export function getNextjsWebpackPluginOptionsTemplate( // Suppresses source map uploading logs during build silent: true, - +${selfHosted ? ` url: "${url}"` : ''} org: "${orgSlug}", project: "${projectSlug}", }`;