From c2dffa53cc4554b42c161ca83527a6f9b3d8950e Mon Sep 17 00:00:00 2001 From: Wojtek Trocki Date: Fri, 18 Sep 2020 12:24:50 +0100 Subject: [PATCH] fix: add ability to perform package override in config --- packages/graphback/src/loadPlugins.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/graphback/src/loadPlugins.ts b/packages/graphback/src/loadPlugins.ts index 1c76eab15c..40ed9b0fa9 100644 --- a/packages/graphback/src/loadPlugins.ts +++ b/packages/graphback/src/loadPlugins.ts @@ -13,6 +13,10 @@ export function loadPlugins(pluginConfig: any): GraphbackPlugin[] { // Internal graphback plugins needs rename pluginName = pluginLabel.replace('graphback-', '@graphback/codegen-'); } + if(config.packageOverride){ + pluginName = config.packageOverride; + } + try { // eslint-disable-next-line @typescript-eslint/no-require-imports const plugin = require(pluginName);