Skip to content

Commit

Permalink
Import block type init directly
Browse files Browse the repository at this point in the history
Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
  • Loading branch information
tyxla and gziolo authored Mar 29, 2023
1 parent 9ec0608 commit 57a019a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/block-library/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ export const getAsyncBlocks = () => [
];

export const asyncLoadBlock = async ( blockType ) => {
const { init } = await import( './' + blockType + '/index.js' );
init();
await import( './' + blockType + '/init.js' );
};

/**
Expand Down

0 comments on commit 57a019a

Please sign in to comment.