antfu-collective / vitesse-webext

⚡️ WebExtension Vite Starter Template
MIT License
2.9k stars 224 forks source link

feat: use localStorage as fallback #151

Closed albertpratomo closed 8 months ago

albertpratomo commented 1 year ago

Description

Use localStorage as fallback for the browser storage in useStorageLocal composable.

This way, when previewing the app in localhost, the app won't crash.

Linked Issues

Fix #150

Additional context

Should we upgrade tsconfig.json compilerOptions.target to "es2017"? So we can use top-level await.

tmkx commented 7 months ago

hi, i agree with you that developing popup/options pages without devtools is very painful. using localStorage as fallback improves the situation, but doesn't fix it completely, we will lose access to the chrome api in a localhost origin.

maybe we can use an external devtools like react-devtools, i'm not sure if there is a vue equivalent