File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ const OPTIONS_TO_BUNDLE = [
12
12
module . exports = function ( babel , options ) {
13
13
const { types : t } = babel ;
14
14
const configPath =
15
- options . configPath ?? path . resolve ( process . cwd ( ) , "codepush.config.js" ) ;
15
+ options . configPath != null
16
+ ? path . resolve ( options . configPath )
17
+ : path . resolve ( process . cwd ( ) , "codepush.config.js" ) ;
16
18
17
19
// Load config and imports from `codepush.config.js`
18
20
const { config, configImports, importedIdentifiers } = loadConfig ( configPath ) ;
@@ -116,7 +118,9 @@ module.exports = function (babel, options) {
116
118
let importDeclaration =
117
119
convertRequireIntoImportStatement ( declaration ) ;
118
120
imports . push ( importDeclaration ) ;
119
- importedIdentifiers . add ( declaration . id . name ) ; // Track the imported identifier
121
+ declaration . id . properties . forEach ( ( dec ) => {
122
+ importedIdentifiers . add ( dec . value . name ) ; // Track the imported identifier
123
+ } ) ;
120
124
}
121
125
} ) ;
122
126
}
You can’t perform that action at this time.
0 commit comments