Closed robhicks closed 2 years ago
I'm getting the same with the very basic vite.config.ts
:
import { sveltekit } from '@sveltejs/kit/vite';
import type { UserConfig } from 'vite';
import { SvelteKitPWA } from '@vite-pwa/sveltekit';
const config: UserConfig = {
plugins: [sveltekit(),
SvelteKitPWA()
]
};
export default config;
And the reason is that there is no library in the module folder:
And, of course, the reason for that is that there is no dist folder, which is specified in the package.json. I guess the package needs to be built locally first?
Edit: SvelteKitPWA is defined in index.ts.
The workaround:
npm i
+ npm run build
npm i -D <path to the cloned folder>
The build command now generates the service worker (and workbox) before writing the output to the build directory:
released v0.0.1
I'm using @sveltejs/kit 1.0.0-next.520, vite 3.1.8 and have installed this package as: "@vite-pwa/sveltekit": "github:vite-pwa/sveltekit".
When running dev or build, I get the following error:
My vite.config.js file looks like this: