123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- exports.id = 96954;
- exports.ids = [96954];
- exports.modules = {
- /***/ 96954:
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- module.exports = __webpack_require__(56773)
- /***/ }),
- /***/ 56773:
- /***/ ((module, exports, __webpack_require__) => {
- "use strict";
- "client";
- Object.defineProperty(exports, "__esModule", ({
- value: true
- }));
- exports["default"] = dynamic;
- exports.noSSR = noSSR;
- var _extends = (__webpack_require__(25550)/* ["default"] */ .Z);
- var _interop_require_default = (__webpack_require__(40213)/* ["default"] */ .Z);
- var _react = _interop_require_default(__webpack_require__(16689));
- var _loadable = _interop_require_default(__webpack_require__(95832));
- function dynamic(dynamicOptions, options) {
- let loadableFn = _loadable.default;
- let loadableOptions = (options == null ? void 0 : options.suspense) ? {} : {
- // A loading component is not required, so we default it
- loading: ({ error , isLoading , pastDelay })=>{
- if (!pastDelay) return null;
- if (false) {}
- return null;
- }
- };
- // Support for direct import(), eg: dynamic(import('../hello-world'))
- // Note that this is only kept for the edge case where someone is passing in a promise as first argument
- // The react-loadable babel plugin will turn dynamic(import('../hello-world')) into dynamic(() => import('../hello-world'))
- // To make sure we don't execute the import without rendering first
- if (dynamicOptions instanceof Promise) {
- loadableOptions.loader = ()=>dynamicOptions;
- // Support for having import as a function, eg: dynamic(() => import('../hello-world'))
- } else if (typeof dynamicOptions === "function") {
- loadableOptions.loader = dynamicOptions;
- // Support for having first argument being options, eg: dynamic({loader: import('../hello-world')})
- } else if (typeof dynamicOptions === "object") {
- loadableOptions = _extends({}, loadableOptions, dynamicOptions);
- }
- // Support for passing options, eg: dynamic(import('../hello-world'), {loading: () => <p>Loading something</p>})
- loadableOptions = _extends({}, loadableOptions, options);
- // Error if Fizz rendering is not enabled and `suspense` option is set to true
- if ( true && loadableOptions.suspense) {
- throw new Error(`Invalid suspense option usage in next/dynamic. Read more: https://nextjs.org/docs/messages/invalid-dynamic-suspense`);
- }
- if (loadableOptions.suspense) {
- if (false) {}
- delete loadableOptions.ssr;
- delete loadableOptions.loading;
- }
- // coming from build/babel/plugins/react-loadable-plugin.js
- if (loadableOptions.loadableGenerated) {
- loadableOptions = _extends({}, loadableOptions, loadableOptions.loadableGenerated);
- delete loadableOptions.loadableGenerated;
- }
- // support for disabling server side rendering, eg: dynamic(import('../hello-world'), {ssr: false}).
- // skip `ssr` for suspense mode and opt-in React.lazy directly
- if (typeof loadableOptions.ssr === "boolean" && !loadableOptions.suspense) {
- if (!loadableOptions.ssr) {
- delete loadableOptions.ssr;
- return noSSR(loadableFn, loadableOptions);
- }
- delete loadableOptions.ssr;
- }
- return loadableFn(loadableOptions);
- }
- "client";
- const isServerSide = "undefined" === "undefined";
- function noSSR(LoadableInitializer, loadableOptions) {
- // Removing webpack and modules means react-loadable won't try preloading
- delete loadableOptions.webpack;
- delete loadableOptions.modules;
- // This check is necessary to prevent react-loadable from initializing on the server
- if (!isServerSide) {
- return LoadableInitializer(loadableOptions);
- }
- const Loading = loadableOptions.loading;
- // This will only be rendered on the server side
- return ()=>/*#__PURE__*/ _react.default.createElement(Loading, {
- error: null,
- isLoading: true,
- pastDelay: false,
- timedOut: false
- });
- }
- if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
- Object.defineProperty(exports.default, "__esModule", {
- value: true
- });
- Object.assign(exports.default, exports);
- module.exports = exports.default;
- } //# sourceMappingURL=dynamic.js.map
- /***/ })
- };
- ;
- //# sourceMappingURL=96954.js.map
|