Skip to content

Commit 3f05bf7

Browse files
committed
remove the simple function
1 parent 8631f12 commit 3f05bf7

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

packages/nextjs/src/config/webpack.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -458,17 +458,6 @@ export function getWebpackPluginOptions(
458458
return { ...defaultPluginOptions, ...userPluginOptions };
459459
}
460460

461-
/**
462-
* NOTE: We're faking `require.resolve` here as a workaround for @vercel/nft detecting the binary itself as a hard
463-
* dependency and always including it in the bundle, which is not what we want.
464-
*
465-
* ref: https://github.com/getsentry/sentry-javascript/issues/3865
466-
* ref: https://github.com/vercel/nft/issues/203
467-
*/
468-
function ensureCLIBinaryExists(): boolean {
469-
return fs.existsSync(SentryCLI.getPath());
470-
}
471-
472461
/** Check various conditions to decide if we should run the plugin */
473462
function shouldEnableWebpackPlugin(buildContext: BuildContext, userSentryOptions: UserSentryOptions): boolean {
474463
const { isServer, dev: isDev } = buildContext;
@@ -482,7 +471,7 @@ function shouldEnableWebpackPlugin(buildContext: BuildContext, userSentryOptions
482471
// architecture-specific version of the `sentry-cli` binary. If `yarn install`, `npm install`, or `npm ci` are run
483472
// with the `--ignore-scripts` option, this will be blocked and the missing binary will cause an error when users
484473
// try to build their apps.)
485-
if (!ensureCLIBinaryExists()) {
474+
if (!fs.existsSync(SentryCLI.getPath())) {
486475
return false;
487476
}
488477

0 commit comments

Comments
 (0)