File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " packagebind" ,
3
- "version" : " 0.3.4 " ,
3
+ "version" : " 0.3.5 " ,
4
4
"description" : " Connect packages to your application with HMR and babel config" ,
5
5
"main" : " lib/index.js" ,
6
6
"repository" : " https://github.com/interviewstreet/packagebind.git" ,
Original file line number Diff line number Diff line change @@ -85,8 +85,11 @@ export default function packagebind (babelConfig) {
85
85
* If its not defined add peer dependency to alias and point it
86
86
* to main repo module.
87
87
*/
88
- if ( aliasPath && aliasPath . startsWith ( module ) ) {
89
- aliasObj [ module ] = aliasPath . replace ( module , currentRepoDir ) ;
88
+
89
+ const repoModulePath = path . resolve ( rootPath , 'node_modules' , module ) ;
90
+
91
+ if ( aliasPath && aliasPath . startsWith ( repoModulePath ) ) {
92
+ aliasObj [ module ] = aliasPath . replace ( rootPath , currentRepoDir ) ;
90
93
} else if ( ! aliasPath ) {
91
94
aliasObj [ module ] = path . resolve ( currentRepoDir , 'node_modules' , module ) ;
92
95
}
You can’t perform that action at this time.
0 commit comments