From 0f426cea2c4666b4e8bc7b93e224c14bc8474e00 Mon Sep 17 00:00:00 2001 From: Deepak Kasu Date: Thu, 6 Mar 2025 14:06:15 -0700 Subject: [PATCH] APIGOV-29723 Fix for loading esm --- src/parser/extension.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/parser/extension.js b/src/parser/extension.js index 8b0926e..353bf9f 100644 --- a/src/parser/extension.js +++ b/src/parser/extension.js @@ -267,6 +267,10 @@ export default class Extension { ctx = ctx.default; } + if (ctx.__esModule) { + ctx = ctx.default; + } + // if the export was a function, call it now to get its CLI definition if (typeof ctx === 'function') { ctx = await ctx(this);