@lvce-editor/renderer-process 10.0.0 → 10.1.0
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/rendererProcessMain.js +18 -2
- package/package.json +2 -2
|
@@ -1516,7 +1516,23 @@ const hydrate$3 = async () => {
|
|
|
1516
1516
|
|
|
1517
1517
|
const isElectron = platform === Electron$1;
|
|
1518
1518
|
|
|
1519
|
-
const
|
|
1519
|
+
const getConfiguredExtensionHostWorkerUrl = () => {
|
|
1520
|
+
if (typeof location === 'undefined' || typeof document === 'undefined') {
|
|
1521
|
+
return '';
|
|
1522
|
+
}
|
|
1523
|
+
const configElement = document.getElementById('Config');
|
|
1524
|
+
if (!configElement) {
|
|
1525
|
+
return '';
|
|
1526
|
+
}
|
|
1527
|
+
const text = configElement.textContent;
|
|
1528
|
+
if (!text) {
|
|
1529
|
+
return '';
|
|
1530
|
+
}
|
|
1531
|
+
const config = JSON.parse(text);
|
|
1532
|
+
return config.extensionHostWorkerUrl || '';
|
|
1533
|
+
};
|
|
1534
|
+
|
|
1535
|
+
const extensionHostWorkerUrl = getConfiguredExtensionHostWorkerUrl() || `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/extension-host-worker/dist/extensionHostWorkerMain.js`;
|
|
1520
1536
|
|
|
1521
1537
|
const launchExtensionHostWorker = async port => {
|
|
1522
1538
|
const name = isElectron ? 'Extension Host (Electron)' : 'Extension Host';
|
|
@@ -5935,7 +5951,7 @@ const create$B = async ({
|
|
|
5935
5951
|
if (isErrorEvent(event)) {
|
|
5936
5952
|
throw new WorkerError(event);
|
|
5937
5953
|
}
|
|
5938
|
-
throw new Error(`Failed to start worker`);
|
|
5954
|
+
throw new Error(`Failed to start ${name} worker`);
|
|
5939
5955
|
}
|
|
5940
5956
|
return worker;
|
|
5941
5957
|
};
|
package/package.json
CHANGED