Closed klaemo closed 3 weeks ago
I guess this would require resolving the vite config and using the configured directories:
import { resolveConfig } from "vite"
import viteConfig from "./vite.config"
const config = await resolveConfig(viteConfig, "build")
// Project root directory. Can be an absolute path, or a path relative from the location of the config file itself.
console.log("root", config.root)
// Directory relative from `root` where build output will be placed.
console.log("build.outDir", config.build.outDir) // remix default: "build/client"
// Directory relative from `outDir` where the built js/css/image assets will be placed.
console.log("build.assetsDir", config.build.assetsDir) // default: "assets"
Specifying a custom
buildDirectory
(docs) in thevite.config.ts
for a remix app makessst deploy
fail.vite.config.js