|
1 | 1 | import type { Options as SentryBuildPluginOptions } from '@sentry/bundler-plugin-core'; |
2 | 2 | import * as path from 'path'; |
3 | | -import type { BuildContext, NextConfigObject, SentryBuildOptions } from './types'; |
| 3 | +import type { SentryBuildOptions } from './types'; |
4 | 4 |
|
5 | 5 | /** |
6 | 6 | * Get Sentry Build Plugin options for both webpack and turbopack builds. |
@@ -161,27 +161,3 @@ export function getBuildPluginOptions({ |
161 | 161 | ...sentryBuildOptions.unstable_sentryWebpackPluginOptions, |
162 | 162 | }; |
163 | 163 | } |
164 | | - |
165 | | -/** |
166 | | - * Legacy function for webpack builds. Now calls the unified getBuildPluginOptions function. |
167 | | - * @deprecated Use getBuildPluginOptions instead |
168 | | - */ |
169 | | -export function getWebpackPluginOptions( |
170 | | - buildContext: BuildContext, |
171 | | - sentryBuildOptions: SentryBuildOptions, |
172 | | - releaseName: string | undefined, |
173 | | -): SentryBuildPluginOptions { |
174 | | - const { isServer, config: userNextConfig, dir, nextRuntime } = buildContext; |
175 | | - const buildTool = isServer ? (nextRuntime === 'edge' ? 'webpack-edge' : 'webpack-nodejs') : 'webpack-client'; |
176 | | - |
177 | | - const projectDir = dir.replace(/\\/g, '/'); |
178 | | - const distDir = (userNextConfig as NextConfigObject).distDir?.replace(/\\/g, '/') ?? '.next'; |
179 | | - const distDirAbsPath = path.posix.join(projectDir, distDir); |
180 | | - |
181 | | - return getBuildPluginOptions({ |
182 | | - sentryBuildOptions, |
183 | | - releaseName, |
184 | | - distDirAbsPath, |
185 | | - buildTool, |
186 | | - }); |
187 | | -} |
0 commit comments