antony / sveltekit-adapter-browser-extension

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

builder.prerender() has been removed. Prerendering now takes place in the build phase — see builder.prerender and builder.writePrerendered #11

Closed alexander-mart closed 2 years ago

alexander-mart commented 2 years ago
  1. Install SvelteKit with pnpm init svelte my-app instead of pnpm init svelte@next my-app

  2. Prepare to use as extension

  3. pnpm run build

> svelte-kit build

vite v2.9.8 building for production...
✓ 14 modules transformed.
.svelte-kit/output/client/app/manifest.json                            1.21 KiB
.svelte-kit/output/client/app/layout.svelte-dfcf0582.js                0.53 KiB / gzip: 0.35 KiB
.svelte-kit/output/client/app/start-2684088d.js                        23.14 KiB / gzip: 8.67 KiB
.svelte-kit/output/client/app/error.svelte-9f636e13.js                 1.56 KiB / gzip: 0.74 KiB
.svelte-kit/output/client/app/pages/index.svelte-ebcfae9a.js           1.22 KiB / gzip: 0.71 KiB
.svelte-kit/output/client/app/assets/pages/index.svelte-4bf12124.css   0.16 KiB / gzip: 0.13 KiB
.svelte-kit/output/client/app/chunks/index-cd7fe918.js                 6.93 KiB / gzip: 2.82 KiB
vite v2.9.8 building SSR bundle for production...
✓ 12 modules transformed.
Generated an empty chunk: "hooks"
.svelte-kit/output/server/manifest.json                        1.17 KiB
.svelte-kit/output/server/index.js                             75.66 KiB
.svelte-kit/output/server/entries/fallbacks/layout.svelte.js   0.24 KiB
.svelte-kit/output/server/entries/fallbacks/error.svelte.js    0.72 KiB
.svelte-kit/output/server/entries/pages/index.svelte.js        0.75 KiB
.svelte-kit/output/server/chunks/index-9f6ceea8.js             2.31 KiB
.svelte-kit/output/server/chunks/hooks-1c45ba0b.js             0.00 KiB

Run npm run preview to preview your production build locally.

> Using sveltekit-adapter-chrome-extension
> builder.prerender() has been removed. Prerendering now takes place in the build phase — see builder.prerender and builder.writePrerendered
 ELIFECYCLE  Command failed with exit code 1.

package.json:

...
  "devDependencies": {
    "@sveltejs/adapter-auto": "next",
    "@sveltejs/kit": "next",
    ...
    "svelte": "^3.44.0",
    "svelte-check": "^2.2.6",
    "svelte-preprocess": "^4.10.1",
    "sveltekit-adapter-chrome-extension": "^1.0.2-next.1",
}
...
alexander-mart commented 2 years ago

I guess this is related issue: https://github.com/sveltejs/kit/issues/4224

And temporary worked fix: https://github.com/sveltejs/kit/issues/4224#issuecomment-1059741336

Theo-Steiner commented 2 years ago

This was fixed by #9 already. Your package.json also shows that you are not using this adapter, but a different adapter instead. So this Issue doesn't belong into this repo