Request for importmap support in web-ifc-viewer
Hi there 👋,
I’m working on the AIfc-Manager-Attribute project and trying to use web-ifc-viewer in a plain HTML demo (no bundler), just via an <script type="importmap"> and native ESM imports. My goal is a minimal “upload IFC file” example. Right now I get “module not found” errors for web-ifc-viewer, web-ifc-three, and three. For example:
<script type="importmap">
{
"imports": {
"three": "./node_modules/three/build/three.module.js",
"web-ifc-three": "./node_modules/web-ifc-viewer/dist/web-ifc-three.module.js",
"web-ifc-viewer": "./node_modules/web-ifc-viewer/dist/index.js"
}
}
</script>
<script type="module">
import { IfcViewerAPI } from 'web-ifc-viewer';
// …
</script>
I’ve also tried copying the files from node_modules/web-ifc-viewer/dist into my public folder and updating paths, but the browser still complains. Could you please share the correct ESM entry points (or CDN URLs) and/or an example import-map configuration that works? I’d love to stay bundler-free for this attribute-viewer demo.
Thanks for any guidance!
—Benoît
cad-ai-support.blog
Request for importmap support in web-ifc-viewer
Hi there 👋,
I’m working on the AIfc-Manager-Attribute project and trying to use web-ifc-viewer in a plain HTML demo (no bundler), just via an
<script type="importmap">and native ESM imports. My goal is a minimal “upload IFC file” example. Right now I get “module not found” errors forweb-ifc-viewer,web-ifc-three, andthree. For example:I’ve also tried copying the files from
node_modules/web-ifc-viewer/distinto my public folder and updating paths, but the browser still complains. Could you please share the correct ESM entry points (or CDN URLs) and/or an example import-map configuration that works? I’d love to stay bundler-free for this attribute-viewer demo.Thanks for any guidance!
—Benoît
cad-ai-support.blog