Context
Using Orb in an Angular 17 component:
export class ApplicationsComponent implements AfterViewInit {
@ViewChild('graph')
graphElement!: ElementRef<HTMLDivElement>;
orbInstance!: Orb;
reload() {
this.orbInstance.data.setup({
nodes: [
{id: "foo", label: "Test App"}
],
edges: []
})
this.orbInstance.view.render(() => {
this.orbInstance.view.recenter();
});
}
ngAfterViewInit(): void {
this.orbInstance = new Orb<Node, Edge>(this.graphElement.nativeElement)
this.reload();
}
}
Problem
When constructing new Orb in ngAfterViewInit(), it tries to load a worker file using a GET call to the following URL:
http://localhost:8990/@fs/home/boss/Projects/rapid-arch/frontend/.angular/cache/17.2.2/vite/deps/process.worker?type=module&worker_file
The following error occurs:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
Question
It seems that Orb is trying to load a webworker or similar, but this URL doesn't exist (content of index.html is returned). Is it possible to preload the worker or supply it under a different path? Is there any configuration to change or deactivate this behavior? If not, can it be changed?
Context
Using Orb in an Angular 17 component:
Problem
When constructing
new OrbinngAfterViewInit(), it tries to load a worker file using a GET call to the following URL:http://localhost:8990/@fs/home/boss/Projects/rapid-arch/frontend/.angular/cache/17.2.2/vite/deps/process.worker?type=module&worker_file
The following error occurs:
Question
It seems that Orb is trying to load a webworker or similar, but this URL doesn't exist (content of index.html is returned). Is it possible to preload the worker or supply it under a different path? Is there any configuration to change or deactivate this behavior? If not, can it be changed?