Skip to content

Commit

Permalink
fix(plugin-electronegativity): add parserPlugins option
Browse files Browse the repository at this point in the history
  • Loading branch information
vhashimotoo committed Jun 12, 2021
1 parent 94b0f96 commit 1b056d4
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 1b056d4

Please sign in to comment.