@tanstack/router-plugin
Version:
Modern and scalable routing for React applications
1 lines • 1.82 kB
Source Map (JSON)
{"version":3,"file":"framework-options.cjs","names":[],"sources":["../../../../src/core/code-splitter/framework-options.ts"],"sourcesContent":["type FrameworkOptions = {\n package: string\n idents: {\n createFileRoute: string\n lazyFn: string\n lazyRouteComponent: string\n }\n}\n\nexport function getFrameworkOptions(framework: string): FrameworkOptions {\n let frameworkOptions: FrameworkOptions\n\n switch (framework) {\n case 'react':\n frameworkOptions = {\n package: '@tanstack/react-router',\n idents: {\n createFileRoute: 'createFileRoute',\n lazyFn: 'lazyFn',\n lazyRouteComponent: 'lazyRouteComponent',\n },\n }\n break\n case 'solid':\n frameworkOptions = {\n package: '@tanstack/solid-router',\n idents: {\n createFileRoute: 'createFileRoute',\n lazyFn: 'lazyFn',\n lazyRouteComponent: 'lazyRouteComponent',\n },\n }\n break\n case 'vue':\n frameworkOptions = {\n package: '@tanstack/vue-router',\n idents: {\n createFileRoute: 'createFileRoute',\n lazyFn: 'lazyFn',\n lazyRouteComponent: 'lazyRouteComponent',\n },\n }\n break\n default:\n throw new Error(\n `[getFrameworkOptions] - Unsupported framework: ${framework}`,\n )\n }\n\n return frameworkOptions\n}\n"],"mappings":";AASA,SAAgB,oBAAoB,WAAqC;CACvE,IAAI;CAEJ,QAAQ,WAAR;EACE,KAAK;GACH,mBAAmB;IACjB,SAAS;IACT,QAAQ;KACN,iBAAiB;KACjB,QAAQ;KACR,oBAAoB;IACtB;GACF;GACA;EACF,KAAK;GACH,mBAAmB;IACjB,SAAS;IACT,QAAQ;KACN,iBAAiB;KACjB,QAAQ;KACR,oBAAoB;IACtB;GACF;GACA;EACF,KAAK;GACH,mBAAmB;IACjB,SAAS;IACT,QAAQ;KACN,iBAAiB;KACjB,QAAQ;KACR,oBAAoB;IACtB;GACF;GACA;EACF,SACE,MAAM,IAAI,MACR,kDAAkD,WACpD;CACJ;CAEA,OAAO;AACT"}