-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update blocks to build using wp-scripts and register with block.json #177
Comments
The Countdown block generates a shortcode from the blocks attributes.
|
Having now implemented the 6 blocks being registered on the server using The result of this call, performed after the block registration is true
But there are no translations being loaded from the
The internationalization and localization works for sb-chart-block, which is built with wp-scripts but uses old style registration. |
See the above referenced issue for the analysis of the problem. There's a summary at bobbingwide/sb-post-edit-block#5 (comment) that explains how to do it for single block plugins and multi-block plugins such as oik. |
oik v4.4.0 in now available from wordpress.org. Closing therefore. |
The blocks in the oik plugin were originally built using
webpack
.When used in WordPress 5.8 the Widget block editor produces a "doing it wrong" message due to the enqueueing of
wp-editor
; this is used for Server Side RenderingIt seems the best solution is to rework the code to build it using
wp-scripts
which will enable use ofSee bobbingwide/bobbingwide#30 (comment)
Requirements
block.json
Proposed solution
webpack.config.js
and.babelrc
package.json
block.json
for each blockindex.js
to register the blockblock.json
get_block_wrapper_attributes()
, where applicablenode_modules
and rebuildProcess for updating node_modules
node_modules
foldernpm install
npm install @wordpress/scripts --save-dev
See https://developer.wordpress.org/block-editor/reference-guides/packages/packages-scripts/
The text was updated successfully, but these errors were encountered: