diff --git a/dist/jsenv_core.js b/dist/jsenv_core.js index 6f8efaa10c..e6a417ddf1 100644 --- a/dist/jsenv_core.js +++ b/dist/jsenv_core.js @@ -17634,10 +17634,17 @@ const jsenvPluginInlineContentFetcher = () => { } let isDirectRequestToFile; if (urlInfo.context.request) { - const requestedUrl = new URL( - urlInfo.context.request.resource.slice(1), - urlInfo.context.rootDirectoryUrl, - ).href; + let requestResource = urlInfo.context.request.resource; + let requestedUrl; + if (requestResource.startsWith("/@fs/")) { + const fsRootRelativeUrl = requestResource.slice("/@fs/".length); + requestedUrl = `file:///${fsRootRelativeUrl}`; + } else { + requestedUrl = new URL( + requestResource.slice(1), + urlInfo.context.rootDirectoryUrl, + ).href; + } isDirectRequestToFile = requestedUrl === urlInfo.url; } /* diff --git a/package.json b/package.json index a5fc386e5a..76216b4da5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@jsenv/core", - "version": "39.9.0", + "version": "39.9.1", "description": "Tool to develop, test and build js projects", "license": "MIT", "author": { diff --git a/src/plugins/reference_analysis/jsenv_plugin_reference_analysis.js b/src/plugins/reference_analysis/jsenv_plugin_reference_analysis.js index cff81e8314..2ce3f86406 100644 --- a/src/plugins/reference_analysis/jsenv_plugin_reference_analysis.js +++ b/src/plugins/reference_analysis/jsenv_plugin_reference_analysis.js @@ -43,10 +43,17 @@ const jsenvPluginInlineContentFetcher = () => { } let isDirectRequestToFile; if (urlInfo.context.request) { - const requestedUrl = new URL( - urlInfo.context.request.resource.slice(1), - urlInfo.context.rootDirectoryUrl, - ).href; + let requestResource = urlInfo.context.request.resource; + let requestedUrl; + if (requestResource.startsWith("/@fs/")) { + const fsRootRelativeUrl = requestResource.slice("/@fs/".length); + requestedUrl = `file:///${fsRootRelativeUrl}`; + } else { + requestedUrl = new URL( + requestResource.slice(1), + urlInfo.context.rootDirectoryUrl, + ).href; + } isDirectRequestToFile = requestedUrl === urlInfo.url; } /*