UNPKG

@sentry/node

Version:

Sentry Node SDK using OpenTelemetry for performance instrumentation

29 lines (28 loc) • 1.24 kB
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); let _sentry_bundler_plugins_webpack = require("@sentry/bundler-plugins/webpack"); let _sentry_server_utils_orchestrion_webpack = require("@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 = (0, _sentry_bundler_plugins_webpack.sentryWebpackPlugin)(options); const orchestrionPlugin = (0, _sentry_server_utils_orchestrion_webpack.sentryOrchestrionWebpackPlugin)(options); return { apply(compiler) { bundlerPlugin.apply(compiler); orchestrionPlugin.apply(compiler); } }; } exports.sentryWebpackPlugin = sentryWebpackPlugin; //# sourceMappingURL=webpack.js.map