From 6c538ebaab1461819acfc88baadb631ba8f26959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Tue, 29 Jan 2019 14:36:24 +0900 Subject: [PATCH] Module 'web-push' as import syntax (#4017) --- package.json | 1 + src/push-sw.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 94beace6e..1fefcb750 100644 --- a/package.json +++ b/package.json @@ -84,6 +84,7 @@ "@types/tinycolor2": "1.4.1", "@types/tmp": "0.0.33", "@types/uuid": "3.4.4", + "@types/web-push": "3.3.0", "@types/webpack": "4.4.24", "@types/webpack-stream": "3.2.10", "@types/websocket": "0.0.40", diff --git a/src/push-sw.ts b/src/push-sw.ts index 58e695813..07b750845 100644 --- a/src/push-sw.ts +++ b/src/push-sw.ts @@ -1,4 +1,4 @@ -const push = require('web-push'); +import * as push from 'web-push'; import * as mongo from 'mongodb'; import Subscription from './models/sw-subscription'; import config from './config';