Open History to see the last commit
1import { defineConfig } from 'vite'
2import tsConfigPaths from 'vite-tsconfig-paths'
3import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
4import viteSolid from 'vite-plugin-solid'
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 server: {
13 port: 3000,
14 },
15 plugins: [
16 tsConfigPaths({
17 projects: ['./tsconfig.json'],
18 }),
19 tanstackStart({
20 serverFns: {
21 generateFunctionId: (opts) => {
22 const id = `${opts.filename}/${opts.functionName}`
23 if (FUNCTIONS_WITH_CONSTANT_ID.includes(id)) return 'constant_id'
24 else return undefined
25 },
26 },
27 }),
28 viteSolid({ ssr: true }),
29 ],
30})