Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from jacobrienstra/patch-1
Browse files Browse the repository at this point in the history
Fix babel parsing plugins (typescript)
  • Loading branch information
jeddy3 committed Mar 12, 2020
2 parents 1957356 + 23077fe commit 2145cc7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions extract.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,16 @@ function loadBabelOpts (opts) {
if (Array.isArray(fileOpts[key]) && !fileOpts[key].length) {
continue;
}
// because some options need to be passed to parser also

opts[key] = fileOpts[key];
opts.parserOpts[key] = fileOpts[key];

if (Array.isArray(fileOpts[key]) && Array.isArray(opts.parserOpts[key])) {
// combine arrays for plugins
opts.parserOpts[key] = opts.parserOpts[key].concat(fileOpts[key]);
} else {
// because some options need to be passed to parser also
opts.parserOpts[key] = fileOpts[key];
}
}
return opts;
}
Expand Down

0 comments on commit 2145cc7

Please sign in to comment.