@lvce-editor/iframe-worker 3.6.0 → 3.6.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.
- package/dist/iframeWorkerMain.js +5 -0
- package/package.json +1 -1
package/dist/iframeWorkerMain.js
CHANGED
|
@@ -956,6 +956,9 @@ const getIframeSrcRemote = (webViews, webViewPort, webViewId, locationProtocol,
|
|
|
956
956
|
}
|
|
957
957
|
let iframeSrc = webViewUri;
|
|
958
958
|
let webViewRoot = webViewUri;
|
|
959
|
+
|
|
960
|
+
// TODO simplify path handling, always use uris so that paths on windows, linux and macos are the same
|
|
961
|
+
|
|
959
962
|
if (platform$1 === Electron) {
|
|
960
963
|
const relativePath = new URL(webViewUri).pathname.replace('/index.html', '');
|
|
961
964
|
iframeSrc = `${WebView}://-${relativePath}/`;
|
|
@@ -965,6 +968,8 @@ const getIframeSrcRemote = (webViews, webViewPort, webViewId, locationProtocol,
|
|
|
965
968
|
if (webViewUri.startsWith('file://')) {
|
|
966
969
|
// ignore
|
|
967
970
|
webViewRoot = webViewUri.slice('file://'.length).replace('/index.html', '');
|
|
971
|
+
} else if (relativePath.startsWith('C:/')) {
|
|
972
|
+
webViewRoot = relativePath;
|
|
968
973
|
} else {
|
|
969
974
|
webViewRoot = root + relativePath;
|
|
970
975
|
}
|