Skip to content

Commit

Permalink
Merge pull request #1864 from belgattitude/fix-sentry-ntm
Browse files Browse the repository at this point in the history
fix: initialization of ntm
  • Loading branch information
belgattitude committed May 17, 2022
2 parents 342b391 + f0ea800 commit f3678fe
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions apps/nextjs-app/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,22 +245,10 @@ const nextConfig = {
},
};

let config;

if (tmModules.length > 0) {
const withNextTranspileModules = require('next-transpile-modules')(
tmModules,
{
resolveSymlinks: true,
debug: false,
}
);
config = withNextTranspileModules(nextConfig);
} else {
config = nextConfig;
}
let config = nextConfig;

if (!NEXTJS_DISABLE_SENTRY) {
// @ts-ignore because sentry does not match nextjs current definitions
config = withSentryConfig(config, {
// Additional config options for the Sentry Webpack plugin. Keep in mind that
// the following options are set automatically, and overriding them is not
Expand All @@ -274,6 +262,21 @@ if (!NEXTJS_DISABLE_SENTRY) {
});
}

if (tmModules.length > 0) {
console.info(
`${pc.green('notice')}- Will transpile [${tmModules.join(',')}]`
);

const withNextTranspileModules = require('next-transpile-modules')(
tmModules,
{
resolveSymlinks: true,
debug: false,
}
);
config = withNextTranspileModules(config);
}

if (process.env.ANALYZE === 'true') {
// @ts-ignore
const withBundleAnalyzer = require('@next/bundle-analyzer')({
Expand Down

3 comments on commit f3678fe

@vercel
Copy link

@vercel vercel bot commented on f3678fe May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

monorepo-vite-app – ./apps/vite-app

monorepo-vite-app.vercel.app
monorepo-vite-app-git-main-belgattitude.vercel.app
monorepo-vite-app-belgattitude.vercel.app

@vercel
Copy link

@vercel vercel bot commented on f3678fe May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

monorepo-nextjs-app – ./apps/nextjs-app

monorepo-nextjs-app.vercel.app
monorepo-nextjs-app-belgattitude.vercel.app
monorepo-nextjs-app-git-main-belgattitude.vercel.app

@vercel
Copy link

@vercel vercel bot commented on f3678fe May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

monorepo-remix-app – ./apps/remix-app

monorepo-remix-app-git-main-belgattitude.vercel.app
monorepo-remix-app.vercel.app
monorepo-remix-app-belgattitude.vercel.app

Please sign in to comment.