diff --git a/package.json b/package.json index ffa1467..673ce24 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "access": "public" }, "private": false, - "version": "0.0.3", + "version": "0.0.4", "main": "dist/index.cjs.js", "module": "dist/index.es.js", "types": "dist/index.d.ts", diff --git a/src/cli/templates/bim-beta/src/main.ts b/src/cli/templates/bim-beta/src/main.ts index eade424..bcd5bfe 100644 --- a/src/cli/templates/bim-beta/src/main.ts +++ b/src/cli/templates/bim-beta/src/main.ts @@ -2,6 +2,10 @@ import * as THREE from "three"; import * as OBC from "@thatopen-platform/components-beta"; import * as OBF from "@thatopen-platform/components-front-beta"; import * as FRAGS from "@thatopen-platform/fragments-beta"; +// Inlines the fragments worker so it runs inside the platform's sandboxed iframe +// (IIFE bundle: no import.meta, no cross-origin fetch). Opt-in — only apps that +// import this pay the worker's size. +import "@thatopen-platform/fragments-beta/inline"; import * as BUI from "@thatopen/ui"; import * as MARKERJS from "@markerjs/markerjs3" import {