-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove @wordpress/editor as a dependency from @wordpress/block-library #32801
Conversation
Size Change: +16 B (0%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
…y when GUTENBERG_PHASE is 1
18d6b31
to
1ce466a
Compare
It's very similar to how gutenberg/packages/server-side-render/src/index.js Lines 19 to 20 in f4f3844
It's a bit unfortunate that we need to work around it like this but we haven't found a better solution so far. We might need to explore using the block context to pass down the necessary data, similar to how it's handled with the Post Template block: gutenberg/packages/block-library/src/post-template/block.json Lines 9 to 12 in f4f3844
gutenberg/packages/block-library/src/post-template/edit.js Lines 27 to 45 in f4f3844
|
…y when GUTENBERG_PHASE is 1 (#32801)
@gziolo @noisysocks I think this PR (or something related) is triggering an eslint error o n #32848 because of the missing dependency. How come the tests is not failing on trunk? |
@youknowriad, it's very strange that it didn't come up as an issue on Line 66 in ee69822
|
…y when GUTENBERG_PHASE is 1 (#32801)
Description
@wordpress/block-library
should not depend on@wordpress/editor
as blocks can be loaded into more contexts than the post or page editor. It also breaks the widgets screen, see Core-53437.How has this been tested?
package.json
and setGUTENBERG_PHASE
to1
.npm run build
cat build/block-library/index.asset.php
wp-editor
should not appear in the array of dependencies that is output.Checklist:
*.native.js
files for terms that need renaming or removal).