antony / sveltekit-adapter-browser-extension

Build browser extensions with Svelte (early prototype)
161 stars 19 forks source link

Added customization of manifest using svelte.config.js #13

Open SergeantWeb opened 2 years ago

SergeantWeb commented 2 years ago

Simple feature added :

You can now customize manifest using svelte.config.json

Usage example

Customize the manifest to name our extension Test extension

// your-project/sveltekit.config.js
import adapter from 'sveltekit-adapter-browser-extension'

/** @type {import('@sveltejs/kit').Config} */
const config = {
    kit: {
        adapter: adapter({
            manifest: {
                name: "Test extension" // Customize app name in manifest
            },
        }),
        appDir: 'ext',
        prerender: {
            default: true
        }
    }
};

export default config;
antony commented 1 year ago

I like the idea of this. I might need to create a new PR as the project now supports multiple manifest versions since this PR was made.