@aws-amplify/core
Version:
Core category of aws-amplify
1 lines • 932 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 return (windowExists() &&\n window.next &&\n 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,IAAI,QAAQ,YAAY,EAAE;AAC1B,QAAQ,MAAM,CAAC,IAAI;AACnB,QAAQ,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE;AACzC,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;;;;"}