Skip to content

Commit

Permalink
fix(plugin-electronegativity): add parserPlugins option (#2323)
Browse files Browse the repository at this point in the history
  • Loading branch information
vhashimotoo committed Jul 11, 2021
1 parent 82fd249 commit c7eff26
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ export type ElectronegativityConfig = {
* from Electron 7 to Electron 8.
*/
electronUpgrade?: string;
/**
* Specify additional parser plugins to use. For example, `optionalChaining`.
*
* Defaults to empty array (`[]`)
*/
parserPlugins: Array<string>;
};

export default class ElectronegativityPlugin extends PluginBase<ElectronegativityConfig> {
Expand All @@ -64,6 +70,7 @@ export default class ElectronegativityPlugin extends PluginBase<Electronegativit
postPackage = async (_forgeConfig: ForgeConfig, options: PostPackageOptions) => {
await runElectronegativity({
...this.config,
parserPlugins: this.config.parserPlugins ?? [],
input: options.outputPaths[0],
}, true);
}
Expand Down

0 comments on commit c7eff26

Please sign in to comment.