capacitor-community / sqlite

⚡Capacitor plugin for native & electron SQLite databases.
MIT License
506 stars 121 forks source link

jeep-sqlite_loader does not export applyPolyfills #592

Open slgotting opened 2 months ago

slgotting commented 2 months ago

Plugin version:

@capacitor-community/sqlite == 6.0.2 jeep-sqlite == 2.8.0

Platform(s):

Database not saving on web but works on android

Current behavior:

Database doesn't persist in browser

Expected behavior:

Database persists in browser

Steps to reproduce:

git clone git@github.com:jepiqueau/vite-sveltekit-capacitor-sqlite.git cd vite-sveltekit-capacitor-sqlite npm i npm audit fix npm i @capacitor/cli@latest @capacitor/core@latest @capacitor/android@latest @capacitor/ios@latest @capacitor-community/sqlite@latest --force

In src/routes/+layout.svelte, remove applyPolyfill:

    // applyPolyfills().then(() => {
        pwaElements(window);

        jeepSqlite(window);
    // });

Additional Notes

The data persists using the old version (5.7.2 I think) but upon upgrade, I don't know how to apply the necessary polyfills

I'm happy to apply the changes to the example repo

kvskandakumar commented 1 month ago

@slgotting, Are there any updates on this issue? Will it be addressed, and if so, could you provide an estimated timeframe for the fix? Additionally, I’d appreciate details on the approach being taken to resolve this issue.

slgotting commented 1 month ago

@kvskandakumar Couldn't figure it out, abandoned local storage for the time being