UNPKG

@sentry/node

Version:

Sentry Node SDK using OpenTelemetry for performance instrumentation

28 lines (27 loc) • 1.07 kB
import { sentryWebpackPlugin as sentryWebpackPlugin$1 } from "@sentry/bundler-plugins/webpack"; import { sentryOrchestrionWebpackPlugin } from "@sentry/server-utils/orchestrion/webpack"; // src/bundler-plugin/webpack.ts /** * webpack plugin that bundles the Sentry webpack bundler plugin (source maps, * release injection, …) together with the code transformer * (build-time `diagnostics_channel` instrumentation for Node libraries). * * It is a drop-in replacement for `@sentry/bundler-plugins/webpack` and accepts * the same options. * @example * ```ts * // webpack.config.mjs * import { sentryWebpackPlugin } from '@sentry/node/webpack'; * export default { plugins: [sentryWebpackPlugin({ org: '…', project: '…' })] }; * ``` */ function sentryWebpackPlugin(options) { const bundlerPlugin = sentryWebpackPlugin$1(options); const orchestrionPlugin = sentryOrchestrionWebpackPlugin(options); return { apply(compiler) { bundlerPlugin.apply(compiler); orchestrionPlugin.apply(compiler); } }; } export { sentryWebpackPlugin }; //# sourceMappingURL=webpack.js.map