Files
bedrock/resources/scripts/editor.js
Kelly Mears cc94b1bc47 bump: bud@6.12.0 & improvements (#3128)
This PR contains various improvements and cleanups to the configuration and JavaScript code. Key changes include:

- Adding simple comments to `jsconfig.json`.
- Improving config: `bud.wpjson.set` replaces `bud.wpjson.settings`. Note that `bud.wpjson.settings` is not deprecated.
- `bud.wpjson.settings` now disables `dropCap` by default.
- `app.js` and `editor.js` now use `if (import.meta.webpackHot)` instead of optional chaining, since `import.meta.webpackHot` is not a real method and using optional chaining might cause errors.
2023-04-05 13:42:27 -04:00

20 lines
470 B
JavaScript

import domReady from '@roots/sage/client/dom-ready';
import { registerBlockStyle, unregisterBlockStyle } from '@wordpress/blocks';
/**
* Editor entrypoint
*/
domReady(() => {
unregisterBlockStyle('core/button', 'outline');
registerBlockStyle('core/button', {
name: 'outline',
label: 'Outline',
});
});
/**
* @see {@link https://webpack.js.org/api/hot-module-replacement/}
*/
if (import.meta.webpackHot) import.meta.webpackHot.accept(console.error);