11import * as vite from "vite" ;
22import * as path from "path" ;
33import * as rollup from "rollup" ;
4- import { default as webpack4 } from "webpack4" ;
5- import { webpack as webpack5 } from "webpack5" ;
4+ import { webpack } from "webpack" ;
65import * as esbuild from "esbuild" ;
76
87import type { Options } from "@sentry/bundler-plugin-core" ;
@@ -91,43 +90,13 @@ export function createCjsBundles(
9190 format : "cjs" ,
9291 } ) ;
9392
94- webpack4 (
95- {
96- devtool : "source-map" ,
97- mode : "production" ,
98- entry : entrypoints ,
99- cache : false ,
100- output : {
101- path : path . join ( outFolder , "webpack4" ) ,
102- libraryTarget : "commonjs" ,
103- } ,
104- target : "node" , // needed for webpack 4 so we can access node api
105- plugins : [
106- sentryWebpackPlugin ( {
107- ...sentryPluginOptions ,
108- release : {
109- name : `${ sentryPluginOptions . release . name ! } -webpack4` ,
110- uploadLegacySourcemaps : `${
111- sentryPluginOptions . release . uploadLegacySourcemaps as string
112- } /webpack4`,
113- } ,
114- } ) ,
115- ] ,
116- } ,
117- ( err ) => {
118- if ( err ) {
119- throw err ;
120- }
121- }
122- ) ;
123-
124- webpack5 (
93+ webpack (
12594 {
12695 devtool : "source-map" ,
12796 cache : false ,
12897 entry : entrypoints ,
12998 output : {
130- path : path . join ( outFolder , "webpack5 " ) ,
99+ path : path . join ( outFolder , "webpack " ) ,
131100 library : {
132101 type : "commonjs" ,
133102 } ,
@@ -137,10 +106,10 @@ export function createCjsBundles(
137106 sentryWebpackPlugin ( {
138107 ...sentryPluginOptions ,
139108 release : {
140- name : `${ sentryPluginOptions . release . name ! } -webpack5 ` ,
109+ name : `${ sentryPluginOptions . release . name ! } -webpack ` ,
141110 uploadLegacySourcemaps : `${
142111 sentryPluginOptions . release . uploadLegacySourcemaps as string
143- } /webpack5 `,
112+ } /webpack `,
144113 } ,
145114 } ) ,
146115 ] ,
0 commit comments