eddev 0.1.45 → 0.1.47

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,21 @@ 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"];
387
+ EXTERNALS["@wordpress/components"] = ["window", "wp"];
388
+ EXTERNALS["@wordpress/element"] = ["window", "wp"];
389
+ EXTERNALS["@wordpress/blocks"] = ["window", "wp"];
390
+ EXTERNALS["@wordpress/utils"] = ["window", "wp"];
391
+ EXTERNALS["@wordpress/data"] = ["window", "wp"];
392
+ EXTERNALS["@wordpress/hooks"] = ["window", "wp"];
393
+ EXTERNALS["@wordpress/block-editor"] = ["window", "wp"];
394
394
  if (opts.isAdmin) {
395
+ EXTERNALS["@wordpress/components"] = ["wp", "components"];
396
+ EXTERNALS["@wordpress/element"] = ["wp", "element"];
397
+ EXTERNALS["@wordpress/blocks"] = ["wp", "blocks"];
398
+ EXTERNALS["@wordpress/utils"] = ["wp", "utils"];
399
+ EXTERNALS["@wordpress/data"] = ["wp", "data"];
400
+ EXTERNALS["@wordpress/hooks"] = ["wp", "hooks"];
401
+ EXTERNALS["@wordpress/block-editor"] = ["wp", "blockEditor"];
395
402
  EXTERNALS["react"] = "React";
396
403
  EXTERNALS["react-dom"] = "ReactDOM";
397
404
  }
@@ -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));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eddev",
3
- "version": "0.1.45",
3
+ "version": "0.1.47",
4
4
  "main": "./index.js",
5
5
  "license": "MIT",
6
6
  "bin": {