File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ class ExportsFinder {
110
110
if ( objectName === 'exports' || objectName === '_exports' ) {
111
111
if ( propertyName === 'default' ) {
112
112
this . hasExportsDefault = true
113
+ this . findExports ( path . get ( property ) , 'right' )
113
114
} else if ( propertyName !== '__esModule' ) {
114
115
this . hasExportsNamed = true
115
116
}
Original file line number Diff line number Diff line change @@ -230,5 +230,19 @@ module.exports = [
230
230
module : 'foo' ,
231
231
exports : 'foo'
232
232
}
233
+ } ,
234
+ {
235
+ name : 'export same var as default and named declarations' ,
236
+ code : 'const foo="bar";export { foo, foo as default };' ,
237
+ expected : {
238
+ exports : {
239
+ default : 'bar' ,
240
+ foo : 'bar'
241
+ } ,
242
+ module : {
243
+ default : 'bar' ,
244
+ foo : 'bar'
245
+ }
246
+ }
233
247
}
234
248
]
You can’t perform that action at this time.
0 commit comments