Open nikitavoloboev opened 3 hours ago
Someone on Discord said to do this:
import { defineConfig } from "@tanstack/start/config"
import tsConfigPaths from "vite-tsconfig-paths"
import { resolve } from "node:path"
import basicSsl from "@vitejs/plugin-basic-ssl"
import { readFileSync } from "node:fs"
import react from "@vitejs/plugin-react"
import { nodePolyfills } from "vite-plugin-node-polyfills"
const local = process.env.LOCAL === "true"
export default defineConfig({
vite: {
plugins: () => [
nodePolyfills({
include: ["path", "stream", "util"],
exclude: ["http"],
globals: {
Buffer: true,
global: true,
process: true,
},
overrides: {
fs: "memfs",
},
protocolImports: true,
}),
react(),
tsConfigPaths({
projects: ["./tsconfig.json"],
}),
...(local !== true
? [
basicSsl({
certDir: resolve("certificates"),
domains: ["tma.internal"],
}),
]
: []),
],
},
server: {
host: "tma.internal",
https:
local === true
? {
cert: readFileSync(resolve("certificates/tma.internal.pem")),
key: readFileSync(resolve("certificates/tma.internal-key.pem")),
}
: undefined,
},
publicDir: "./public",
})
and that works but now I get a different error:
my repo for reference: https://github.com/nikitavoloboev/new-telegram-app
and vinxi config: https://github.com/nikitavoloboev/new-telegram-app/blob/main/app.config.ts
I want to move this vite config to vinxi:
I thought below would work in vinxi:
but it's complaining about:
not sure what I can do.