@aws-amplify/core
Version:
Core category of aws-amplify
21 lines (19 loc) • 756 B
JavaScript
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
Object.defineProperty(exports, "__esModule", { value: true });
exports.nextSSRDetect = exports.nextWebDetect = void 0;
const helpers_1 = require("./helpers");
// Tested with next 13.4 / react 18.2
function nextWebDetect() {
return ((0, helpers_1.windowExists)() &&
window.next &&
typeof window.next === 'object');
}
exports.nextWebDetect = nextWebDetect;
function nextSSRDetect() {
return ((0, helpers_1.globalExists)() &&
((0, helpers_1.keyPrefixMatch)(global, '__next') || (0, helpers_1.keyPrefixMatch)(global, '__NEXT')));
}
exports.nextSSRDetect = nextSSRDetect;
//# sourceMappingURL=Next.js.map
;