Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
1 line
No EOL
5.2 KiB
Text
1 line
No EOL
5.2 KiB
Text
{"version":3,"sources":["../../src/build/get-babel-loader-config.ts"],"sourcesContent":["import type { EnvironmentConfig } from 'babel-plugin-react-compiler'\nimport path from 'path'\nimport type { JSONValue, ReactCompilerOptions } from '../server/config-shared'\nimport type { NextBabelLoaderOptions } from './babel/loader/types'\n\nfunction getReactCompiler() {\n try {\n return require.resolve('babel-plugin-react-compiler')\n } catch {\n throw new Error(\n 'Failed to load the `babel-plugin-react-compiler`. It is required to use the React Compiler. Please install it.'\n )\n }\n}\n\nconst getReactCompilerPlugins = (\n maybeOptions: boolean | ReactCompilerOptions | undefined,\n isServer: boolean,\n isDev: boolean\n): undefined | JSONValue[] => {\n if (!maybeOptions || isServer) {\n return undefined\n }\n\n const environment: Pick<EnvironmentConfig, 'enableNameAnonymousFunctions'> = {\n enableNameAnonymousFunctions: isDev,\n }\n const options: ReactCompilerOptions =\n typeof maybeOptions === 'boolean' ? {} : maybeOptions\n const compilerOptions: JSONValue = {\n ...options,\n environment,\n }\n return [[getReactCompiler(), compilerOptions]]\n}\n\nconst getBabelLoader = (\n useSWCLoader: boolean | undefined,\n babelConfigFile: string | undefined,\n isServer: boolean,\n distDir: string,\n pagesDir: string | undefined,\n cwd: string,\n srcDir: string,\n dev: boolean,\n isClient: boolean,\n reactCompilerOptions: boolean | ReactCompilerOptions | undefined,\n reactCompilerExclude: ((excludePath: string) => boolean) | undefined\n) => {\n if (!useSWCLoader) {\n // Make sure these options are kept in sync with\n // `packages/next/src/build/get-babel-loader-config.ts`\n const options: NextBabelLoaderOptions = {\n transformMode: 'default',\n configFile: babelConfigFile,\n isServer,\n distDir,\n pagesDir,\n cwd,\n srcDir: path.dirname(srcDir),\n development: dev,\n hasReactRefresh: dev && isClient,\n hasJsxRuntime: true,\n reactCompilerPlugins: getReactCompilerPlugins(\n reactCompilerOptions,\n isServer,\n dev\n ),\n reactCompilerExclude,\n }\n return {\n loader: require.resolve('./babel/loader/index'),\n options,\n }\n }\n\n return undefined\n}\n\n/**\n * Get a separate babel loader for the react compiler, only used if Babel is not\n * configured through e.g. .babelrc. If user have babel config, this should be configured in the babel loader itself.\n * Note from react compiler:\n * > For best results, compiler must run as the first plugin in your Babel pipeline so it receives input as close to the original source as possible.\n */\nconst getReactCompilerLoader = (\n reactCompilerOptions: boolean | ReactCompilerOptions | undefined,\n cwd: string,\n isServer: boolean,\n reactCompilerExclude: ((excludePath: string) => boolean) | undefined,\n isDev: boolean\n) => {\n const reactCompilerPlugins = getReactCompilerPlugins(\n reactCompilerOptions,\n isServer,\n isDev\n )\n if (!reactCompilerPlugins) {\n return undefined\n }\n\n const babelLoaderOptions: NextBabelLoaderOptions = {\n transformMode: 'standalone',\n cwd,\n reactCompilerPlugins,\n isServer,\n }\n if (reactCompilerExclude) {\n babelLoaderOptions.reactCompilerExclude = reactCompilerExclude\n }\n\n return {\n loader: require.resolve('./babel/loader/index'),\n options: babelLoaderOptions,\n }\n}\n\nexport { getBabelLoader, getReactCompilerLoader }\n"],"names":["path","getReactCompiler","require","resolve","Error","getReactCompilerPlugins","maybeOptions","isServer","isDev","undefined","environment","enableNameAnonymousFunctions","options","compilerOptions","getBabelLoader","useSWCLoader","babelConfigFile","distDir","pagesDir","cwd","srcDir","dev","isClient","reactCompilerOptions","reactCompilerExclude","transformMode","configFile","dirname","development","hasReactRefresh","hasJsxRuntime","reactCompilerPlugins","loader","getReactCompilerLoader","babelLoaderOptions"],"mappings":"AACA,OAAOA,UAAU,OAAM;AAIvB,SAASC;IACP,IAAI;QACF,OAAOC,QAAQC,OAAO,CAAC;IACzB,EAAE,OAAM;QACN,MAAM,qBAEL,CAFK,IAAIC,MACR,mHADI,qBAAA;mBAAA;wBAAA;0BAAA;QAEN;IACF;AACF;AAEA,MAAMC,0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