@@ -70,44 +70,45 @@ function () {
70
70
}
71
71
);
72
72
73
+ wp_register_script_module (
74
+ '@html-api-debugger/replace-invisible-chars ' ,
75
+ plugins_url ( 'replace-invisible-chars.js ' , __FILE__ ),
76
+ array (),
77
+ VERSION
78
+ );
79
+
80
+ wp_register_script_module (
81
+ '@html-api-debugger/print-html-tree ' ,
82
+ plugins_url ( 'print-html-tree.js ' , __FILE__ ),
83
+ array (
84
+ array (
85
+ 'id ' => '@html-api-debugger/replace-invisible-chars ' ,
86
+ 'import ' => 'dynamic ' ,
87
+ ),
88
+ ),
89
+ VERSION
90
+ );
91
+
92
+ wp_enqueue_script_module (
93
+ '@html-api-debugger/main ' ,
94
+ plugins_url ( 'view.js ' , __FILE__ ),
95
+ array (
96
+ '@wordpress/interactivity ' ,
97
+ '@html-api-debugger/print-html-tree ' ,
98
+ array (
99
+ 'id ' => '@html-api-debugger/replace-invisible-chars ' ,
100
+ 'import ' => 'dynamic ' ,
101
+ ),
102
+ ),
103
+ VERSION
104
+ );
105
+
73
106
add_action (
74
107
'admin_enqueue_scripts ' ,
75
108
function ( $ hook_suffix ) {
76
109
if ( $ hook_suffix === 'toplevel_page_ ' . SLUG ) {
77
110
wp_enqueue_style ( SLUG , plugins_url ( 'style.css ' , __FILE__ ), array (), VERSION );
78
-
79
- wp_register_script_module (
80
- '@html-api-debugger/replace-invisible-chars ' ,
81
- plugins_url ( 'replace-invisible-chars.js ' , __FILE__ ),
82
- array (),
83
- VERSION
84
- );
85
-
86
- wp_register_script_module (
87
- '@html-api-debugger/print-html-tree ' ,
88
- plugins_url ( 'print-html-tree.js ' , __FILE__ ),
89
- array (
90
- array (
91
- 'id ' => '@html-api-debugger/replace-invisible-chars ' ,
92
- 'import ' => 'dynamic ' ,
93
- ),
94
- ),
95
- VERSION
96
- );
97
-
98
- wp_enqueue_script_module (
99
- '@html-api-debugger/view ' ,
100
- plugins_url ( 'view.js ' , __FILE__ ),
101
- array (
102
- '@wordpress/interactivity ' ,
103
- '@html-api-debugger/print-html-tree ' ,
104
- array (
105
- 'id ' => '@html-api-debugger/replace-invisible-chars ' ,
106
- 'import ' => 'dynamic ' ,
107
- ),
108
- ),
109
- VERSION
110
- );
111
+ wp_enqueue_script_module ( '@html-api-debugger/view ' );
111
112
}
112
113
}
113
114
);
0 commit comments