Skip to content

Commit

Permalink
CJS loaded Default imports (#930)
Browse files Browse the repository at this point in the history
* add logic to load cjs loaded plugins with default exports

* fix comment
  • Loading branch information
mmason2-godaddy authored Sep 26, 2024
1 parent 71e69a1 commit d033a50
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/gasket-core/lib/gasket.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d033a50

Please sign in to comment.