tango-ui-cw 1.0.0 → 1.0.1
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.
|
@@ -8,8 +8,13 @@
|
|
|
8
8
|
* (e.g. during `npm install` in the library's own repo before first build).
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
import fs from "fs";
|
|
12
|
+
import path from "path";
|
|
13
|
+
import { fileURLToPath } from "url";
|
|
14
|
+
import { createRequire } from "module";
|
|
15
|
+
|
|
16
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
17
|
+
const __dirname = path.dirname(__filename);
|
|
13
18
|
|
|
14
19
|
// If dist/index.js doesn't exist, we're in a pre-build state — skip silently.
|
|
15
20
|
const distEntry = path.resolve(__dirname, "..", "index.js");
|
|
@@ -17,6 +22,8 @@ if (!fs.existsSync(distEntry)) {
|
|
|
17
22
|
process.exit(0);
|
|
18
23
|
}
|
|
19
24
|
|
|
25
|
+
const require = createRequire(import.meta.url);
|
|
26
|
+
|
|
20
27
|
const REQUIRED_PEERS = [
|
|
21
28
|
{ name: "react", range: ">=18", hint: "React 18+ is required." },
|
|
22
29
|
{ name: "react-dom", range: ">=18", hint: "ReactDOM 18+ is required." },
|