diff --git a/packages/toolkit/plugin-v2/src/cli/run/create.ts b/packages/toolkit/plugin-v2/src/cli/run/create.ts index b135fde72f27..6735b13cf478 100644 --- a/packages/toolkit/plugin-v2/src/cli/run/create.ts +++ b/packages/toolkit/plugin-v2/src/cli/run/create.ts @@ -80,7 +80,7 @@ export const createCli = () => { context.pluginAPI = pluginAPI; for (const plugin of plugins) { - const setupResult = await plugin.setup(pluginAPI); + const setupResult = await plugin.setup?.(pluginAPI); if (handleSetupResult) { await handleSetupResult(setupResult, pluginAPI); }