@aws-amplify/core
Version:
Core category of aws-amplify
1 lines • 940 B
Source Map (JSON)
{"version":3,"file":"Next.mjs","sources":["../../../../src/Platform/detection/Next.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { globalExists, keyPrefixMatch, windowExists } from './helpers';\n// Tested with next 13.4 / react 18.2\nexport function nextWebDetect() {\n // @ts-ignore\n return windowExists() && window['next'] && typeof window['next'] === 'object';\n}\nexport function nextSSRDetect() {\n return (globalExists() &&\n (keyPrefixMatch(global, '__next') || keyPrefixMatch(global, '__NEXT')));\n}\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACO,SAAS,aAAa,GAAG;AAChC;AACA,IAAI,OAAO,YAAY,EAAE,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,QAAQ,CAAC;AAClF,CAAC;AACM,SAAS,aAAa,GAAG;AAChC,IAAI,QAAQ,YAAY,EAAE;AAC1B,SAAS,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,EAAE;AAChF;;;;"}