eddev 0.1.45 → 0.1.46-b1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -384,14 +384,14 @@ function getWebpackConfig(opts) {
|
|
|
384
384
|
_d.label = 14;
|
|
385
385
|
case 14:
|
|
386
386
|
// External Gutenberg
|
|
387
|
-
EXTERNALS["@wordpress/components"] = ["wp", "components"];
|
|
388
|
-
EXTERNALS["@wordpress/element"] = ["wp", "element"];
|
|
389
|
-
EXTERNALS["@wordpress/blocks"] = ["wp", "blocks"];
|
|
390
|
-
EXTERNALS["@wordpress/utils"] = ["wp", "utils"];
|
|
391
|
-
EXTERNALS["@wordpress/data"] = ["wp", "data"];
|
|
392
|
-
EXTERNALS["@wordpress/hooks"] = ["wp", "hooks"];
|
|
393
|
-
EXTERNALS["@wordpress/block-editor"] = ["wp", "blockEditor"];
|
|
394
387
|
if (opts.isAdmin) {
|
|
388
|
+
EXTERNALS["@wordpress/components"] = ["wp", "components"];
|
|
389
|
+
EXTERNALS["@wordpress/element"] = ["wp", "element"];
|
|
390
|
+
EXTERNALS["@wordpress/blocks"] = ["wp", "blocks"];
|
|
391
|
+
EXTERNALS["@wordpress/utils"] = ["wp", "utils"];
|
|
392
|
+
EXTERNALS["@wordpress/data"] = ["wp", "data"];
|
|
393
|
+
EXTERNALS["@wordpress/hooks"] = ["wp", "hooks"];
|
|
394
|
+
EXTERNALS["@wordpress/block-editor"] = ["wp", "blockEditor"];
|
|
395
395
|
EXTERNALS["react"] = "React";
|
|
396
396
|
EXTERNALS["react-dom"] = "ReactDOM";
|
|
397
397
|
}
|
|
@@ -13,6 +13,9 @@ var react_dom_1 = __importDefault(require("react-dom"));
|
|
|
13
13
|
var BrowserRouter_1 = require("../components/BrowserRouter");
|
|
14
14
|
var Root_1 = __importDefault(require("./Root"));
|
|
15
15
|
// @ts-ignore
|
|
16
|
+
if (!window.wp)
|
|
17
|
+
window.wp = {};
|
|
18
|
+
// @ts-ignore
|
|
16
19
|
if (react_dom_1.default.createRoot) {
|
|
17
20
|
// @ts-ignore
|
|
18
21
|
react_dom_1.default.createRoot(document.getElementById("root")).render((0, jsx_runtime_1.jsx)(BrowserRouter_1.BrowserRouter, { children: (0, jsx_runtime_1.jsx)(Root_1.default, {}, void 0) }, void 0));
|