From d033a509309a0d6785dd8e4bbe8735546bdf231b Mon Sep 17 00:00:00 2001 From: Michael Mason <105235096+mmason2-godaddy@users.noreply.github.com> Date: Wed, 25 Sep 2024 17:18:34 -0700 Subject: [PATCH] CJS loaded Default imports (#930) * add logic to load cjs loaded plugins with default exports * fix comment --- packages/gasket-core/lib/gasket.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/gasket-core/lib/gasket.js b/packages/gasket-core/lib/gasket.js index bb31fff4c..f2d1ae905 100644 --- a/packages/gasket-core/lib/gasket.js +++ b/packages/gasket-core/lib/gasket.js @@ -38,6 +38,7 @@ export class Gasket { // prune nullish and/or empty plugins config.plugins = config.plugins .filter(Boolean) + .map(plugin => plugin.default || plugin) // quality of life for cjs apps .filter(plugin => Boolean(plugin.name) || Boolean(plugin.hooks)); // start the engine