diff --git a/packages/viewer/package.json b/packages/viewer/package.json index 045dd8b3..59499259 100644 --- a/packages/viewer/package.json +++ b/packages/viewer/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/viewer", - "version": "0.8.13", + "version": "0.8.14", "type": "module", "sideEffects": true, "description": "Read-only file previews with bounded loading and graceful fallback.", diff --git a/packages/viewer/src/plugin.ts b/packages/viewer/src/plugin.ts index cd752590..1ac602cf 100644 --- a/packages/viewer/src/plugin.ts +++ b/packages/viewer/src/plugin.ts @@ -52,7 +52,7 @@ function optionalRuntimes(): { id: string; entry: string; bundle?: boolean }[] { const runtimes: { id: string; entry: string; bundle?: boolean }[] = []; for (const item of OPTIONAL) { if (!resolves(item.package)) continue; - runtimes.push({ id: item.id, entry: here(item.entry) }); + runtimes.push({ id: item.id, entry: here(item.entry), bundle: true }); } // pdf.js is served from its own published build, not bundled: putting its ESM // entry through a bundler breaks the worker handshake. Both files are already @@ -93,8 +93,8 @@ export function viewerPlugin(options: ViewerPluginOptions = {}) { name: "@wrnexus/viewer", componentDirs: [here("../components")], clientRuntimes: [ - { id: "viewer-code", entry: here("./code-editor.ts") }, - { id: "viewer", entry: here("./runtime.ts") }, + { id: "viewer-code", entry: here("./code-editor.ts"), bundle: true }, + { id: "viewer", entry: here("./runtime.ts"), bundle: true }, ...optionalRuntimes(), ], styleSources: [{ id: "viewer", entry: here("../viewer.css") }],