You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Angular build system does not seem to correctly pick up worker URLs:
Security Error: Content at http://localhost:4200/ may not load data from file:///.../node_modules/@evolu/common-web/dist/Db.worker.js.
This happens for both the old ("browser") and new ("esbuild"/"application") Angular build systems, regardless of a dev or production build. I suspect this might be because workers are defined inside a factory function. Additionally, if I'm reading your code right, the DB factory relies on the DB worker, which in turn defines the Sync worker. However,
This only applies to the new build system, but I'm noting it already since it might cause issues later.
A suggestion: instead of supporting a specific framework like Angular, you could allow custom worker URLs to be passed to Evolu. This would allow users to self-host workers separate from their build system. I've seen this pattern before in open-source projects (e.g., a workerSrc property in pdf.js).
Since createEvolu comes from a factory function, I tried to do this myself, but the common-web package doesn't export the required tooling for this (e.g., wrap), and my project won't compile as a result.
I hope we can fix this–I'd love to start with Evolu.
The text was updated successfully, but these errors were encountered:
I'm happy to help with advice, or I can export missing functionality, but any direct work for supporting Angular has a low priority for me. I highly recommend using any other library; Angular was abandoned even by its authors.
As for the this Issue, I haven't tried it for angular yet, currently more focused on svelte but sooner or later I'll definitely try Angular (with Evolu) again
The Angular build system does not seem to correctly pick up worker URLs:
This happens for both the old ("browser") and new ("esbuild"/"application") Angular build systems, regardless of a dev or production build. I suspect this might be because workers are defined inside a factory function. Additionally, if I'm reading your code right, the DB factory relies on the DB worker, which in turn defines the Sync worker. However,
This only applies to the new build system, but I'm noting it already since it might cause issues later.
A suggestion: instead of supporting a specific framework like Angular, you could allow custom worker URLs to be passed to Evolu. This would allow users to self-host workers separate from their build system. I've seen this pattern before in open-source projects (e.g., a
workerSrc
property in pdf.js).Since
createEvolu
comes from a factory function, I tried to do this myself, but the common-web package doesn't export the required tooling for this (e.g.,wrap
), and my project won't compile as a result.I hope we can fix this–I'd love to start with Evolu.
The text was updated successfully, but these errors were encountered: