How do I adopt v8_viteEnvironmentApi when based on the node custom server template #14671
Unanswered
LeoDanielsson
asked this question in
Q&A
Replies: 1 comment
-
import { reactRouter } from "@react-router/dev/vite";
import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({
plugins: [tailwindcss(), reactRouter(), tsconfigPaths()],
environments: {
ssr: {
build: { //<- You have to add build
rollupOptions: {
input: "./server/app.ts",
}
}
}
}
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The Node custom server template has the following Vite config.
When adopting the v8_viteEnvironmentApi future flag, how do I properly modify this config to leverage the environment API? The documentations is a bit lacking.
Something like this?
Beta Was this translation helpful? Give feedback.
All reactions