I'm using the latest sveltekit as of writing (sveltejs/kit@1.24.1).
When following the example in the adapter README, I get the following error when building:
error during build:
Error: Unexpected option config.kit.prerender.default
at file:///app/browser_extension/node_modules/.pnpm/@sveltejs+kit@1.24.1_svelte@4.2.0_vite@4.4.9/node_modules/@sveltejs/kit/src/core/config/options.js:315:12
However, if I remove the config.kit.prerender.default from config, building then fails with a contradictory message:
> Using sveltekit-adapter-browser-extension
You should set `config.kit.prerender.default` to `true` if no fallback is specified
error during build:
Error: ENOENT: no such file or directory, open 'build/index.html'
at Object.openSync (node:fs:602:3)
at readFileSync (node:fs:470:35)
I'm using the latest sveltekit as of writing (
sveltejs/kit@1.24.1
).When following the example in the adapter README, I get the following error when building:
However, if I remove the
config.kit.prerender.default
from config, building then fails with a contradictory message:I found a solution that seems to work at https://stackoverflow.com/a/76883793:
Create a
routes/+layout.ts
file containing the following line:export const prerender = true;
(And make sure you removed the prerender item from config). Once I did this, I still get a warning, but the extension builds.