Skip to content

Commit

Permalink
Merge pull request #17591 from mozilla/fix-next-version
Browse files Browse the repository at this point in the history
fix(next): resolve package import version warnings
  • Loading branch information
StaberindeZA committed Sep 12, 2024
2 parents 361afb9 + 66023d5 commit 7af8c82
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions apps/payments/next/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { composePlugins, withNx } = require('@nx/next');
const { withSentryConfig } = require('@sentry/nextjs');
const { version } = require('./package.json');

/**
* @type {import('@nx/next/plugins/with-nx').WithNxOptions}
Expand All @@ -17,6 +18,9 @@ const nextConfig = {
// See: https://github.com/gregberge/svgr
svgr: false,
},
env: {
version,
},
experimental: {
instrumentationHook: true,
serverComponentsExternalPackages: [
Expand Down
3 changes: 1 addition & 2 deletions apps/payments/next/sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// The config you add here will be used whenever a users loads a page in their browser.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import { initSentryForNextjsClient } from '@fxa/shared/sentry/client';
import { version } from './package.json';

const DEFAULT_SAMPLE_RATE = '1';
const DEFAULT_TRACES_SAMPLE_RATE = '1';
Expand All @@ -25,6 +24,6 @@ const sentryConfig = {
};

initSentryForNextjsClient({
release: version,
release: process.env.version,
sentry: sentryConfig,
});
3 changes: 1 addition & 2 deletions apps/payments/next/sentry.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import { initSentryForNextjsServer } from '@fxa/shared/sentry';
import { config } from './config';
import { version } from './package.json';

const sentryConfig = {
dsn: config.nextPublicSentryDsn,
Expand All @@ -19,7 +18,7 @@ const sentryConfig = {

initSentryForNextjsServer(
{
release: version,
release: process.env.version,
sentry: sentryConfig,
},
console
Expand Down

0 comments on commit 7af8c82

Please sign in to comment.