We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf25bcd commit 3d87ce1Copy full SHA for 3d87ce1
app/setup.php
@@ -46,35 +46,6 @@
46
])->toHtml();
47
});
48
49
-/**
50
- * Add Vite's HMR client to the block editor.
51
- *
52
- * @return void
53
- */
54
-add_action('enqueue_block_assets', function () {
55
- if (! is_admin() || ! get_current_screen()?->is_block_editor()) {
56
- return;
57
- }
58
-
59
- if (! Vite::isRunningHot()) {
60
61
62
63
- $script = sprintf(
64
- <<<'JS'
65
- window.__vite_client_url = '%s';
66
67
- window.self !== window.top && document.head.appendChild(
68
- Object.assign(document.createElement('script'), { type: 'module', src: '%s' })
69
- );
70
- JS,
71
- untrailingslashit(Vite::asset('')),
72
- Vite::asset('@vite/client')
73
74
75
- wp_add_inline_script('wp-blocks', $script);
76
-});
77
78
/**
79
* Use the generated theme.json file.
80
*
0 commit comments