@file-viewer/core 2.1.29 → 2.1.30
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/platform/assets.js +6 -1
- package/package.json +1 -1
package/dist/platform/assets.js
CHANGED
|
@@ -34,7 +34,12 @@ const resolveFileViewerScriptAssetBaseCandidate = (script, documentBaseUrl, inde
|
|
|
34
34
|
const scriptUrl = new URL(rawScriptUrl, documentBaseUrl);
|
|
35
35
|
const viteClient = scriptUrl.pathname.match(/^(.*\/)@vite\/client$/i);
|
|
36
36
|
const isSourceModule = /\/(?:src|node_modules|@fs|@id|@vite)(?:\/|$)/i.test(scriptUrl.pathname);
|
|
37
|
-
|
|
37
|
+
// Start at the first emitted asset directory so nested layouts such as
|
|
38
|
+
// `static/js` and `assets/js/chunks` resolve to the deployment root.
|
|
39
|
+
// Source trees are excluded above and must never become a public base.
|
|
40
|
+
const assetDirectory = isSourceModule
|
|
41
|
+
? null
|
|
42
|
+
: scriptUrl.pathname.match(/^(.*?\/)(?:assets|static|js)(?:\/[^/]*)*\/[^/]+\.(?:m?js)$/i);
|
|
38
43
|
const entryScript = isSourceModule
|
|
39
44
|
? null
|
|
40
45
|
: scriptUrl.pathname.match(/^(.*\/)(?:app|index|main|runtime|umi)(?:[.-][^/]*)?\.(?:m?js)$/i);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@file-viewer/core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.30",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Framework-neutral modular TypeScript core for Flyfish File Viewer renderer orchestration, lifecycle APIs, search, zoom, print, and export",
|