-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathindex.ts
More file actions
22 lines (15 loc) · 782 Bytes
/
index.ts
File metadata and controls
22 lines (15 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { SentryWebpackPluginOptions, sentryWebpackUnpluginFactory } from "./webpack4and5";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore webpack is a peer dep
import * as webpack4or5 from "webpack";
const BannerPlugin = webpack4or5?.BannerPlugin || webpack4or5?.default?.BannerPlugin;
const DefinePlugin = webpack4or5?.DefinePlugin || webpack4or5?.default?.DefinePlugin;
const sentryUnplugin = sentryWebpackUnpluginFactory({
BannerPlugin,
DefinePlugin,
});
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const sentryWebpackPlugin: (options?: SentryWebpackPluginOptions) => any =
sentryUnplugin.webpack;
export { sentryCliBinaryExists } from "@sentry/bundler-plugin-core";
export type { SentryWebpackPluginOptions };