Closed withintheruins14 closed 3 years ago
I have one ESM module that exports the Loki db, like so:
import Loki from 'lokijs'; export default new Loki('n2x', { autosave: true, env: 'BROWSER' });
I have two separate ESM modules that are loaded as web workers. They both import the db module above.
I add items to the collection in one of the workers and I can see that there is data in the collection
data
When I retrieve that collection in the other worker there is no data.
Should I expect this to work? Happy to post the code if anyone could please help me. Thanks!
I have one ESM module that exports the Loki db, like so:
I have two separate ESM modules that are loaded as web workers. They both import the db module above.
I add items to the collection in one of the workers and I can see that there is
data
in the collectionWhen I retrieve that collection in the other worker there is no data.
Should I expect this to work? Happy to post the code if anyone could please help me. Thanks!