one
Version:
One is a React framework for web, iOS, and Android apps.
1 lines • 1.74 kB
Source Map (JSON)
{"version":3,"file":"getPageExport.js","names":[],"sources":["esm/utils/getPageExport.js"],"sourcesContent":["const getPageLikeExports = (x) => x !== \"loader\" && x[0].toUpperCase() === x[0];\nconst getPageExport = (exported) => {\n return exported.default || // because HMR fails with default exports, allow exporting something else\n // we just find the first non-loader export for now...\n (() => {\n const keys = Object.keys(exported);\n if (process.env.NODE_ENV === \"development\") {\n const upperCaseExports = keys.filter(getPageLikeExports);\n if (upperCaseExports.length > 1) {\n console.warn(`Warning: You've exported more than one uppercase non-default export.\n\nIf there is no default export, One uses the first capitalized non-default export.\nThis is because React Refresh, the hot reloading library, does not work on default\nexports, so you may prefer to use non-default exports. But exporting multiple can\ncause issues, as browser clients and server runtimes may not sort the export keys\nthe same.\n\nBe sure to only export a single capitalized non-default export per-route.\n `);\n }\n }\n const nonLoader = keys.find(getPageLikeExports);\n if (nonLoader) {\n return exported[nonLoader];\n }\n })();\n};\nexport {\n getPageExport\n};\n//# sourceMappingURL=getPageExport.js.map\n"],"mappings":";AAAA,MAAM,sBAAsB,MAAM,MAAM,YAAY,EAAE,EAAE,CAAC,YAAY,MAAM,EAAE;AAC7E,MAAM,iBAAiB,aAAa;CAClC,OAAO,SAAS,kBAET;EACL,MAAM,OAAO,OAAO,KAAK,QAAQ;EACjC,IAAI,QAAQ,IAAI,aAAa,eAAe;GAC1C,MAAM,mBAAmB,KAAK,OAAO,kBAAkB;GACvD,IAAI,iBAAiB,SAAS,GAAG;IAC/B,QAAQ,KAAK;;;;;;;;;aASR;GACP;EACF;EACA,MAAM,YAAY,KAAK,KAAK,kBAAkB;EAC9C,IAAI,WAAW;GACb,OAAO,SAAS;EAClB;CACF,EAAC,CAAE;AACL"}