File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " babel-plugin-transform-barrels" ,
3- "version" : " 1.0.16 " ,
3+ "version" : " 1.0.17 " ,
44 "description" : " A Babel plugin that transforms indirect imports through a barrel file (index.js) into direct imports." ,
55 "homepage" : " https://github.com/FogelAI/babel-plugin-transform-barrels" ,
66 "main" : " src/main.js" ,
Original file line number Diff line number Diff line change @@ -149,9 +149,7 @@ class BarrelFile {
149149 const { exportedName } = specifierObj ;
150150 const deepestDirectSpecifier = this . getDeepestDirectSpecifierObject ( specifierObj ) ;
151151 deepestDirectSpecifier . esmPath = PathFunctions . normalizeModulePath ( deepestDirectSpecifier . esmPath ) ;
152- if ( ! this . defaultPatternExport . isMatchDefaultPattern ( deepestDirectSpecifier ) ) {
153- this . exportMapping [ exportedName ] = deepestDirectSpecifier ;
154- }
152+ this . exportMapping [ exportedName ] = deepestDirectSpecifier ;
155153 }
156154 }
157155 }
@@ -230,7 +228,8 @@ class BarrelFile {
230228 getDeepestDirectSpecifierObject ( specifierObj ) {
231229 const { esmPath, localName } = specifierObj ;
232230 if ( BarrelFile . isBarrelFilename ( esmPath ) ) {
233- const barrelFile = BarrelFileManagerFacade . getBarrelFile ( esmPath ) ;
231+ const absEsmFile = resolver . resolve ( esmPath , this . path ) . absEsmFile ;
232+ const barrelFile = BarrelFileManagerFacade . getBarrelFile ( absEsmFile ) ;
234233 if ( barrelFile . isBarrelFileContent ) {
235234 const deepestSpecifier = barrelFile . getDirectSpecifierObject ( localName ) ;
236235 return this . getDeepestDirectSpecifierObject ( deepestSpecifier ) ;
You can’t perform that action at this time.
0 commit comments