@@ -9,10 +9,8 @@ import deepMerge from 'deepmerge';
99import {
1010 makeBrowserBuildPlugin ,
1111 makeCleanupPlugin ,
12- makeCommonJSPlugin ,
1312 makeIsDebugBuildPlugin ,
1413 makeLicensePlugin ,
15- makeNodeResolvePlugin ,
1614 makeRrwebBuildPlugin ,
1715 makeSetSDKSourcePlugin ,
1816 makeSucrasePlugin ,
@@ -26,7 +24,6 @@ const BUNDLE_VARIANTS = ['.js', '.min.js', '.debug.min.js'];
2624export function makeBaseBundleConfig ( options ) {
2725 const { bundleType, entrypoints, licenseTitle, outputFileBase, packageSpecificConfig, sucrase } = options ;
2826
29- const nodeResolvePlugin = makeNodeResolvePlugin ( ) ;
3027 const sucrasePlugin = makeSucrasePlugin ( { } , sucrase ) ;
3128 const cleanupPlugin = makeCleanupPlugin ( ) ;
3229 const markAsBrowserBuildPlugin = makeBrowserBuildPlugin ( true ) ;
@@ -37,11 +34,6 @@ export function makeBaseBundleConfig(options) {
3734 } ) ;
3835 const productionReplacePlugin = makeProductionReplacePlugin ( ) ;
3936
40- // The `commonjs` plugin is the `esModuleInterop` of the bundling world. When used with `transformMixedEsModules`, it
41- // will include all dependencies, imported or required, in the final bundle. (Without it, CJS modules aren't included
42- // at all, and without `transformMixedEsModules`, they're only included if they're imported, not if they're required.)
43- const commonJSPlugin = makeCommonJSPlugin ( { transformMixedEsModules : true } ) ;
44-
4537 // used by `@sentry/browser`
4638 const standAloneBundleConfig = {
4739 output : {
@@ -93,7 +85,7 @@ export function makeBaseBundleConfig(options) {
9385 output : {
9486 format : 'esm' ,
9587 } ,
96- plugins : [ commonJSPlugin , makeTerserPlugin ( ) , licensePlugin ] ,
88+ plugins : [ makeTerserPlugin ( ) , licensePlugin ] ,
9789 // Don't bundle any of Node's core modules
9890 external : builtinModules ,
9991 } ;
@@ -102,7 +94,7 @@ export function makeBaseBundleConfig(options) {
10294 output : {
10395 format : 'esm' ,
10496 } ,
105- plugins : [ commonJSPlugin , makeIsDebugBuildPlugin ( true ) , makeTerserPlugin ( ) ] ,
97+ plugins : [ makeIsDebugBuildPlugin ( true ) , makeTerserPlugin ( ) ] ,
10698 // Don't bundle any of Node's core modules
10799 external : builtinModules ,
108100 } ;
@@ -118,7 +110,7 @@ export function makeBaseBundleConfig(options) {
118110 strict : false ,
119111 esModule : false ,
120112 } ,
121- plugins : [ productionReplacePlugin , sucrasePlugin , nodeResolvePlugin , cleanupPlugin ] ,
113+ plugins : [ sucrasePlugin , cleanupPlugin ] ,
122114 treeshake : 'smallest' ,
123115 } ;
124116
0 commit comments