Skip to content

Commit

Permalink
Work around the default exception
Browse files Browse the repository at this point in the history
  • Loading branch information
jpage-godaddy committed Jan 31, 2025
1 parent b7ecb6c commit adb38eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/gasket-core/lib/gasket.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +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
.map(plugin => 'default' in plugin ? plugin.default : plugin) // quality of life for cjs apps
.filter(plugin => Boolean(plugin.name) || Boolean(plugin.hooks));

// start the engine
Expand Down
2 changes: 1 addition & 1 deletion packages/gasket-core/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ declare module '@gasket/core' {

// This is the config
export interface GasketConfig {
plugins: Array<Plugin>;
plugins: Array<Plugin | { default: Plugin }>;
root: string;
env: string;
}
Expand Down

0 comments on commit adb38eb

Please sign in to comment.