Skip to content

Commit 9a5cd3d

Browse files
authored
[ENHANCEMENT] Build ESM Peer Dependency, Typing & Configs (#27)
* πŸ‘· Switch to ESM build * πŸ”§ Use `module` instead of `main` config fields * πŸ“Œ Reinstall sk-auth * 🏷️ Fix type errors * πŸ”§ Create separate Vite config JS according to sveltejs/kit#928 * Revert "πŸ”§ Create separate Vite config JS according to sveltejs/kit#928" This reverts commit 83d23a5. * βž• Add `build-esm` as dev and peer dependency * πŸ‘· Compile CJS module * πŸ“Œ Reinstall deps * πŸ”§ Switch to ESM build * Revert "πŸ”§ Switch to ESM build" This reverts commit c908a57. * πŸ”§ Use `main` instead of `module` in `package.json`
1 parent b2d3995 commit 9a5cd3d

File tree

5 files changed

+2829
-20
lines changed

5 files changed

+2829
-20
lines changed

β€Žapp/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"@typescript-eslint/eslint-plugin": "^4.19.0",
1515
"@typescript-eslint/parser": "^4.19.0",
1616
"autoprefixer": "^10.2.5",
17+
"build-esm": "^4.2.2",
1718
"cssnano": "^5.0.1",
1819
"eslint": "^7.22.0",
1920
"eslint-config-prettier": "^8.1.0",

β€Žapp/src/lib/appAuth.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export const appAuth = new SvelteKitAuth({
3333
apiKey: import.meta.env.VITE_REDDIT_API_KEY,
3434
apiSecret: import.meta.env.VITE_REDDIT_API_SECRET,
3535
profile(profile) {
36-
profile = RedditOAuth2Provider.profileHandler(profile);
37-
return { ...profile, provider: "reddit" };
36+
const slim = RedditOAuth2Provider.profileHandler(profile);
37+
return { ...slim, provider: "reddit" };
3838
},
3939
}),
4040
],

0 commit comments

Comments
Β (0)