@trops/dash-core 0.1.45 → 0.1.46
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.
- package/dist/electron/index.js +14 -0
- package/dist/electron/index.js.map +1 -1
- package/package.json +1 -1
package/dist/electron/index.js
CHANGED
|
@@ -8641,6 +8641,20 @@ var dynamicWidgetLoaderExports = dynamicWidgetLoader$2.exports;
|
|
|
8641
8641
|
|
|
8642
8642
|
for (const candidate of candidates) {
|
|
8643
8643
|
if (fs.existsSync(candidate)) {
|
|
8644
|
+
// Skip ESM files — the eval pipeline requires CJS
|
|
8645
|
+
if (candidate.endsWith(".js") && !candidate.endsWith(".cjs.js")) {
|
|
8646
|
+
try {
|
|
8647
|
+
const head = fs.readFileSync(candidate, "utf8").slice(0, 256);
|
|
8648
|
+
if (/^\s*(import\s|export\s)/m.test(head)) {
|
|
8649
|
+
console.log(
|
|
8650
|
+
`[WidgetRegistry] Skipping ESM bundle: ${candidate}`,
|
|
8651
|
+
);
|
|
8652
|
+
continue;
|
|
8653
|
+
}
|
|
8654
|
+
} catch (_) {
|
|
8655
|
+
// Non-fatal — allow fallthrough
|
|
8656
|
+
}
|
|
8657
|
+
}
|
|
8644
8658
|
return candidate;
|
|
8645
8659
|
}
|
|
8646
8660
|
}
|