@@ -30,7 +30,6 @@ const packageDotJSON = JSON.parse(fs.readFileSync(path.resolve(process.cwd(), '.
3030export function makeBaseNPMConfig ( options = { } ) {
3131 const {
3232 entrypoints = [ 'src/index.ts' ] ,
33- esModuleInterop = false ,
3433 hasBundles = false ,
3534 packageSpecificConfig = { } ,
3635 sucrase = { } ,
@@ -56,9 +55,8 @@ export function makeBaseNPMConfig(options = {}) {
5655
5756 sourcemap : true ,
5857
59- // Include __esModule property when generating exports
60- // Before the upgrade to Rollup 4 this was included by default and when it was gone it broke tests
61- esModule : true ,
58+ // Include __esModule property when there is a default prop
59+ esModule : 'if-default-prop' ,
6260
6361 // output individual files rather than one big bundle
6462 preserveModules : true ,
@@ -84,16 +82,7 @@ export function makeBaseNPMConfig(options = {}) {
8482 // (We don't need it, so why waste the bytes?)
8583 freeze : false ,
8684
87- // Equivalent to `esModuleInterop` in tsconfig.
88- // Controls whether rollup emits helpers to handle special cases where turning
89- // `import * as dogs from 'dogs'`
90- // into
91- // `const dogs = require('dogs')`
92- // doesn't work.
93- //
94- // `auto` -> emit helpers
95- // `esModule` -> don't emit helpers
96- interop : esModuleInterop ? 'auto' : 'esModule' ,
85+ interop : 'esModule' ,
9786 } ,
9887
9988 plugins : [
0 commit comments