Closed Dan6erbond closed 3 years ago
Using Rollup to create a distributable bundle with multiple entrypoints for svelte-kit-auth, svelte-kit-auth/client and svelte-kit-auth/providers.
svelte-kit-auth
svelte-kit-auth/client
svelte-kit-auth/providers
rollup-plugin-multi-input
src
dist
package.json
client
providers
SvelteKitAuth
$app/*
signIn()
redirectUrl
signOut()
Overview
Using Rollup to create a distributable bundle with multiple entrypoints for
svelte-kit-auth
,svelte-kit-auth/client
andsvelte-kit-auth/providers
.Rollup & Package Config
rollup-plugin-multi-input
to mirror thesrc
directory structure indist
.package.json
files have been added forclient
andproviders
to provide separate entry points to the library.Library Modifications
SvelteKitAuth
is exported as a named export fromsvelte-kit-auth
.$app/*
augmented modules from SvelteKit due to issues with imports.Issues
signIn()
does not redirect to the sign-in path, and cannot automatically determine aredirectUrl
due to missing access to the SvelteKit router.signOut()
cannot update SvelteKit's sessions -> use a separate SvelteKitAuth session.