@@ -9,11 +9,8 @@ import deepMerge from 'deepmerge';
99import {
1010 makeBrowserBuildPlugin ,
1111 makeCleanupPlugin ,
12- makeCommonJSPlugin ,
1312 makeIsDebugBuildPlugin ,
14- makeJsonPlugin ,
1513 makeLicensePlugin ,
16- makeNodeResolvePlugin ,
1714 makeRrwebBuildPlugin ,
1815 makeSetSDKSourcePlugin ,
1916 makeSucrasePlugin ,
@@ -26,7 +23,6 @@ const BUNDLE_VARIANTS = ['.js', '.min.js', '.debug.min.js'];
2623export function makeBaseBundleConfig ( options ) {
2724 const { bundleType, entrypoints, licenseTitle, outputFileBase, packageSpecificConfig, sucrase } = options ;
2825
29- const nodeResolvePlugin = makeNodeResolvePlugin ( ) ;
3026 const sucrasePlugin = makeSucrasePlugin ( { } , sucrase ) ;
3127 const cleanupPlugin = makeCleanupPlugin ( ) ;
3228 const markAsBrowserBuildPlugin = makeBrowserBuildPlugin ( true ) ;
@@ -36,13 +32,6 @@ export function makeBaseBundleConfig(options) {
3632 excludeShadowDom : false ,
3733 } ) ;
3834
39- // The `commonjs` plugin is the `esModuleInterop` of the bundling world. When used with `transformMixedEsModules`, it
40- // will include all dependencies, imported or required, in the final bundle. (Without it, CJS modules aren't included
41- // at all, and without `transformMixedEsModules`, they're only included if they're imported, not if they're required.)
42- const commonJSPlugin = makeCommonJSPlugin ( { transformMixedEsModules : true } ) ;
43-
44- const jsonPlugin = makeJsonPlugin ( ) ;
45-
4635 // used by `@sentry/browser`
4736 const standAloneBundleConfig = {
4837 output : {
@@ -94,7 +83,7 @@ export function makeBaseBundleConfig(options) {
9483 output : {
9584 format : 'esm' ,
9685 } ,
97- plugins : [ commonJSPlugin , makeTerserPlugin ( ) , licensePlugin ] ,
86+ plugins : [ makeTerserPlugin ( ) , licensePlugin ] ,
9887 // Don't bundle any of Node's core modules
9988 external : builtinModules ,
10089 } ;
@@ -103,7 +92,7 @@ export function makeBaseBundleConfig(options) {
10392 output : {
10493 format : 'esm' ,
10594 } ,
106- plugins : [ commonJSPlugin , makeIsDebugBuildPlugin ( true ) , makeTerserPlugin ( ) ] ,
95+ plugins : [ makeIsDebugBuildPlugin ( true ) , makeTerserPlugin ( ) ] ,
10796 // Don't bundle any of Node's core modules
10897 external : builtinModules ,
10998 } ;
@@ -119,7 +108,7 @@ export function makeBaseBundleConfig(options) {
119108 strict : false ,
120109 esModule : false ,
121110 } ,
122- plugins : [ sucrasePlugin , nodeResolvePlugin , cleanupPlugin ] ,
111+ plugins : [ sucrasePlugin , cleanupPlugin ] ,
123112 treeshake : 'smallest' ,
124113 } ;
125114
0 commit comments