File tree 1 file changed +1
-9
lines changed
packages/vite/src/node/optimizer
1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -997,22 +997,14 @@ export async function extractExportsData(
997
997
return exportsData
998
998
}
999
999
1000
- // https://github.com/vitejs/vite/issues/1724#issuecomment-767619642
1001
- // a list of modules that pretends to be ESM but still uses `require`.
1002
- // this causes esbuild to wrap them as CJS even when its entry appears to be ESM.
1003
- const KNOWN_INTEROP_IDS = new Set ( [ 'moment' ] )
1004
-
1005
1000
function needsInterop (
1006
1001
config : ResolvedConfig ,
1007
1002
ssr : boolean ,
1008
1003
id : string ,
1009
1004
exportsData : ExportsData ,
1010
1005
output ?: { exports : string [ ] } ,
1011
1006
) : boolean {
1012
- if (
1013
- getDepOptimizationConfig ( config , ssr ) ?. needsInterop ?. includes ( id ) ||
1014
- KNOWN_INTEROP_IDS . has ( id )
1015
- ) {
1007
+ if ( getDepOptimizationConfig ( config , ssr ) ?. needsInterop ?. includes ( id ) ) {
1016
1008
return true
1017
1009
}
1018
1010
const { hasImports, exports } = exportsData
You can’t perform that action at this time.
0 commit comments