pnpm install
pnpm build
chrome://extensions
Load unpacked
and open the build
directory from this projectIn vite.config.ts
there are two custom plugins:
extensionManifestPlugin
- small plugin to "build" the manifest. it will remove the $schema
key if present and write out to the build directoryextensionWorkerPlugin
- small plugin to build the worker file. it will leverage the same codebase as SvelteKit, meaning aliases such as $lib
should work without additional configIn svelte.config.js
we are changing the appDir
to point to build/app
in order to mitigate issues with the browser loading the extension:
Cannot load extension with file or directory name _app. Filenames starting with "_" are reserved for use by the system.