antony / sveltekit-adapter-browser-extension

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

Address breaking adapter API changes in #4192 #8

Closed Theo-Steiner closed 2 years ago

Theo-Steiner commented 2 years ago

Up until a few days ago @FireMakeThunder's fix for the previous breaking adapter changes worked great, but in rapidly changing svelte-kit land nothing stays the same and there again have been breaking changes to the adapter API, that will need to be addressed for this adapter to work properly. sveltejs/kit#4192 moved the prerendering from the adapt to the build step and introduced a config option for adapter-static like behaviour at config.kit.prerender.default.

Until a PR for addressing this breaking change is merged, you can still use this adapter by simply installing npm install -D Theo-Steiner/sveltekit-adapter-browser-extension and modify your config to look like this:

import adapterBrowserExtension from 'sveltekit-adapter-browser-extension';

/** @type {import('@sveltejs/kit').Config} */
const config = {
    kit: {
        prerender: {
            default: true
        },
        adapter: adapterBrowserExtension(),
        appDir: 'ext'
    }
};

export default config;
Theo-Steiner commented 2 years ago

this also addresses #6

antony commented 2 years ago

Thank you!