Open History to see the last commit
1import { defineConfig } from 'vite'
2import tsConfigPaths from 'vite-tsconfig-paths'
3import { tanstackStart } from '@tanstack/react-start/plugin/vite'
4import viteReact from '@vitejs/plugin-react'
5β
6const FUNCTIONS_WITH_CONSTANT_ID = [
7 'src/routes/submit-post-formdata.tsx/greetUser_createServerFn_handler',
8 'src/routes/formdata-redirect/index.tsx/greetUser_createServerFn_handler',
9]
10β
11export default defineConfig({
12 plugins: [
13 tsConfigPaths({
14 projects: ['./tsconfig.json'],
15 }),
16 tanstackStart({
17 serverFns: {
18 generateFunctionId: (opts) => {
19 const id = `${opts.filename}/${opts.functionName}`
20 if (FUNCTIONS_WITH_CONSTANT_ID.includes(id)) return 'constant_id'
21 else return undefined
22 },
23 },
24 }),
25 viteReact(),
26 ],
27})