-
Notifications
You must be signed in to change notification settings - Fork 20
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
CSS Only Entrypoints #356
base: develop
Are you sure you want to change the base?
CSS Only Entrypoints #356
Conversation
|
true | ||
); | ||
|
||
$settings['editor_script_handles'][] = $script_handle; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fabiankaegy What would be the best way to register the style handler for the frontend AND gutenberg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as editorScript
there also is a script
property in block.json
that loads in both places
|
||
$js_editor_hmr_file = $dir . '/' . str_replace( '.css', '.js', $editor_style_file_name ); | ||
|
||
// TODO: do not enqueue this file if its name ends up being the same as editorScript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sure there might be some other edge cases, we need a way to safely load these things automatically, perhaps we add a flag per block?
@nicholasio I just tested this and it works like a charm 🤩 |
@nicholasio what are the next steps here? how can I help move this forward? |
Related Issue/RFC: #168
Description of the Change
Alternate Designs
Possible Drawbacks
Verification Process
npm run dev
Checklist: