Skip to content

Commit

Permalink
sync load edit for heading, list(-item), p, quote
Browse files Browse the repository at this point in the history
  • Loading branch information
flootr committed Dec 7, 2023
1 parent 489fab8 commit 1a75db7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 20 deletions.
6 changes: 2 additions & 4 deletions packages/block-library/src/heading/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { __, sprintf } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import lazyLoad from '../utils/lazy-load';
import edit from './edit';
import initBlock from '../utils/init-block';
import deprecated from './deprecated';

Expand Down Expand Up @@ -62,9 +62,7 @@ export const settings = {
( attributesToMerge.content || '' ),
};
},
edit: lazyLoad( () =>
import( /* webpackChunkName: "heading/editor" */ './edit' )
),
edit,
save,
};

Expand Down
6 changes: 2 additions & 4 deletions packages/block-library/src/list-item/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { listItem as icon } from '@wordpress/icons';
/**
* Internal dependencies
*/
import lazyLoad from '../utils/lazy-load';
import edit from './edit';
import initBlock from '../utils/init-block';
import metadata from './block.json';

Expand All @@ -19,9 +19,7 @@ export { metadata, name };

export const settings = {
icon,
edit: lazyLoad( () =>
import( /* webpackChunkName: "list-item/editor" */ './edit' )
),
edit,
save,
merge( attributes, attributesToMerge ) {
return {
Expand Down
6 changes: 2 additions & 4 deletions packages/block-library/src/list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import lazyLoad from '../utils/lazy-load';
import edit from './edit';
import initBlock from '../utils/init-block';
import deprecated from './deprecated';

Expand Down Expand Up @@ -46,9 +46,7 @@ const settings = {
],
},
transforms,
edit: lazyLoad( () =>
import( /* webpackChunkName: "list/editor" */ './edit' )
),
edit,
save,
deprecated,
};
Expand Down
6 changes: 2 additions & 4 deletions packages/block-library/src/paragraph/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { paragraph as icon } from '@wordpress/icons';
/**
* Internal dependencies
*/
import lazyLoad from '../utils/lazy-load';
import edit from './edit';
import initBlock from '../utils/init-block';
import deprecated from './deprecated';
import metadata from './block.json';
Expand Down Expand Up @@ -52,9 +52,7 @@ export const settings = {
( attributesToMerge.content || '' ),
};
},
edit: lazyLoad( () =>
import( /* webpackChunkName: "paragraph/editor" */ './edit' )
),
edit,
save,
};

Expand Down
6 changes: 2 additions & 4 deletions packages/block-library/src/quote/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { quote as icon } from '@wordpress/icons';
/**
* Internal dependencies
*/
import lazyLoad from '../utils/lazy-load';
import edit from './edit';
import initBlock from '../utils/init-block';
import deprecated from './deprecated';

Expand Down Expand Up @@ -35,9 +35,7 @@ export const settings = {
],
},
transforms,
edit: lazyLoad( () =>
import( /* webpackChunkName: "quote/editor" */ './edit' )
),
edit,
save,
deprecated,
};
Expand Down

0 comments on commit 1a75db7

Please sign in to comment.