Storage
You can use the vanilla APIs (see docs above), use WXT's built-in storage API, or install a package from NPM.
Alternatives
wxt/storage
(recommended): WXT ships with its own wrapper around the vanilla storage APIs that simplifies common use casesDIY: If you're migrating to WXT and already have a storage wrapper, keep using it. In the future, if you want to delete that code, you can use one of these alternatives, but there's no reason to replace working code during a migration.
Any other NPM package: There are lots of wrappers around the storage API, you can find one you like. Here's some popular ones:
webext-storage
- A more usable typed storage API for Web Extensions@webext-core/storage
- A type-safe, localStorage-esque wrapper around the web extension storage APIs