Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
NODE_OPTIONS = "--max-old-space-size=4096"

[build]
command = "vite build && cp src/instrument.server.mjs dist/server"
command = "vite build --logLevel warn && cp src/instrument.server.mjs dist/server"
publish = "dist/client"

[functions]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dev": "pnpm run with-env vite dev",
"with-env": "dotenv -e .env.local",
"dev:frontend": "pnpm run with-env vite dev",
"build": "vite build",
"build": "vite build --logLevel warn",
"start": "vite start",
"start:prod": "pnpm run with-env node scripts/run-built-server.mjs",
"content:build": "node scripts/build-content-collections.mjs",
Expand Down
10 changes: 10 additions & 0 deletions src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3225,3 +3225,13 @@ const rootRouteChildren: RootRouteChildren = {
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)
._addFileTypes<FileRouteTypes>()

import type { getRouter } from './router.tsx'
import type { startInstance } from './start.ts'
declare module '@tanstack/react-start' {
interface Register {
ssr: true
router: Awaited<ReturnType<typeof getRouter>>
config: Awaited<ReturnType<typeof startInstance.getOptions>>
}
}
5 changes: 4 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const isDev = process.env.NODE_ENV !== 'production'
const shouldUseSentryPlugin =
process.env.NODE_ENV === 'production' &&
Boolean(process.env.SENTRY_AUTH_TOKEN)
const shouldBuildSourcemaps =
shouldUseSentryPlugin || process.env.BUILD_SOURCEMAPS === 'true'

const rscSsrExternals = [
// OpenTelemetry uses require-in-the-middle which is CJS-only and breaks
Expand Down Expand Up @@ -164,7 +166,8 @@ export default defineConfig({
],
},
build: {
sourcemap: process.env.NODE_ENV === 'production',
sourcemap: shouldBuildSourcemaps,
reportCompressedSize: false,
rollupOptions: {
external: (id) => {
// Externalize postgres from client bundle
Expand Down
Loading