Skip to content

Commit

Permalink
Fix web-push notification import
Browse files Browse the repository at this point in the history
Had to ts-ignore it to prevent a build error.
I think possibly an issue between the actual package being written in commonjs javascript and then having a separate type definition package.
Tested locally with a separate file and import seems to be working.

Signed-off-by: Brian Evans <ebrian101@gmail.com>
  • Loading branch information
mrbrianevans committed Oct 26, 2024
1 parent ab5dca7 commit 1d06f49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion backend-shared/notifications/sendWebNotification.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {getRedisClient} from "../getRedisClient.js";
import * as webPush from 'web-push'
//@ts-ignore
import webPush from 'web-push';
import type {PushSubscription} from "web-push";
import {sharedLogger} from "../loggers.js";

Expand Down
3 changes: 2 additions & 1 deletion backend-shared/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"strictNullChecks": true,
"composite": true,
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true
"resolveJsonModule": true,
"esModuleInterop": true
},
"exclude": [
"node_modules"
Expand Down

0 comments on commit 1d06f49

Please sign in to comment.