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