const config = defineConfig({
define: {
__APP_VERSION__: JSON.stringify(pkg.version),
},
plugins: [
devtools(),
// this is the plugin that enables path aliases
viteTsConfigPaths({
projects: ['./tsconfig.json'],
}),
tailwindcss(),
tanstackStart(),
viteReact(),
// Cloudflare must come AFTER tanstackStart
cloudflare({ viteEnvironment: { name: 'ssr' } }),
],
// Exclude TanStack Start virtual modules from dependency optimization
// Also tried without this
optimizeDeps: {
exclude: [
'@tanstack/react-start',
'@tanstack/start-server-core',
'@tanstack/react-start/server',
'@tanstack/react-router-ssr-query',
],
},
// Also tried without this)
ssr: {
// Don't externalize these - let Vite bundle them
noExternal: [
'@tanstack/react-router-ssr-query',
],
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/tests/test-setup.ts'],
},
})
export default config
const config = defineConfig({
define: {
__APP_VERSION__: JSON.stringify(pkg.version),
},
plugins: [
devtools(),
// this is the plugin that enables path aliases
viteTsConfigPaths({
projects: ['./tsconfig.json'],
}),
tailwindcss(),
tanstackStart(),
viteReact(),
// Cloudflare must come AFTER tanstackStart
cloudflare({ viteEnvironment: { name: 'ssr' } }),
],
// Exclude TanStack Start virtual modules from dependency optimization
// Also tried without this
optimizeDeps: {
exclude: [
'@tanstack/react-start',
'@tanstack/start-server-core',
'@tanstack/react-start/server',
'@tanstack/react-router-ssr-query',
],
},
// Also tried without this)
ssr: {
// Don't externalize these - let Vite bundle them
noExternal: [
'@tanstack/react-router-ssr-query',
],
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/tests/test-setup.ts'],
},
})
export default config