vite-pwa / sveltekit

Zero-config PWA Plugin for SvelteKit
https://vite-pwa-org.netlify.app/frameworks/sveltekit
MIT License
324 stars 15 forks source link

Support Node v20 #71

Closed acedeb closed 1 year ago

acedeb commented 1 year ago

Hello,

Currently the Node engine is set between 16.14 and 18.x. Would it be possible to bump 20? I see vite-plugin-pwa only requires above 16.0.0.

From

  "engines": {
    "node": ">=16.14 || >=18"
  },

to

  "engines": {
    "node": ">=16.14 || >=20"
  },
acedeb commented 1 year ago

Seems I was confused, my bad.

The error in my project was from me using adapter-vercel.

So in svelte.config.js I can specify the runtime.

import adapter from "@sveltejs/adapter-vercel";
const config = {
  kit: {
    adapter: adapter({
      runtime: "nodejs18.x",
    }),
  },
}