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
Hello guys, im having a issue when create a login page. I tried to console.log(storageDemo) in setup hook, in dev mode it prints correct value, but in build mode it always prints default value. You can see my screenshot below.
it doesn't seem to be a problem, it depends on the order of rendering and storage accessing. storageDemo is a reactive value, if you want to get the latest value, use storage.local.get, if you want to subscribe to the latest value, use watch/watchEffect
I've found that useWebExtensionSettings is fundamentally flawed.
We are storing a bit larger json for caching purposes. Then when reading key.value it returns the default value, but if used with setTimeout(() => console.log(key.value), 1000) it works as there is enough time for the serializer to write the value.
Basically, useWebExtensionSettings() uses async calls (storage and serializer). Still, there is no way to use await as it isn't an async function itself, and top-level js wouldn't allow await use either.
Describe the bug
Hello guys, im having a issue when create a login page. I tried to console.log(storageDemo) in setup hook, in dev mode it prints correct value, but in build mode it always prints default value. You can see my screenshot below.
In dev mode:
In build mode:
Please help, thanks in advance!
Reproduction
https://github.com/antfu/vitesse-webext/blob/refactor/mv3/src/popup/Popup.vue
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: