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 {
110110 if ( objectName === 'exports' || objectName === '_exports' ) {
111111 if ( propertyName === 'default' ) {
112112 this . hasExportsDefault = true
113+ this . findExports ( path . get ( property ) , 'right' )
113114 } else if ( propertyName !== '__esModule' ) {
114115 this . hasExportsNamed = true
115116 }
Original file line number Diff line number Diff line change @@ -230,5 +230,19 @@ module.exports = [
230230 module : 'foo' ,
231231 exports : 'foo'
232232 }
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+ }
233247 }
234248]
You can’t perform that action at this time.
0 commit comments