From 9c88bdedce57d57247ae763610c6fdf66514507b Mon Sep 17 00:00:00 2001 From: wang Date: Thu, 30 Mar 2023 03:16:55 +0900 Subject: [PATCH] fix `global` is undefined in Vite fix `global` is undefined in Vite. --- packages/aws-appsync-auth-link/src/signer/signer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-appsync-auth-link/src/signer/signer.ts b/packages/aws-appsync-auth-link/src/signer/signer.ts index d628dc03..5e46b222 100644 --- a/packages/aws-appsync-auth-link/src/signer/signer.ts +++ b/packages/aws-appsync-auth-link/src/signer/signer.ts @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"). You may not use or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -global.Buffer = global.Buffer || require('buffer').Buffer; // Required for aws sigv4 signing +globalThis.Buffer = globalThis.Buffer || require('buffer').Buffer; // Required for aws sigv4 signing var url = require('url');