| 1 | import { dirname, resolve } from "node:path"; |
| 2 | import { fileURLToPath } from "node:url"; |
| 3 | import { defineConfig } from "vite"; |
| 4 | import solidPlugin from "vite-plugin-solid"; |
| 5 | |
| 6 | const __dirname = dirname(fileURLToPath(import.meta.url)); |
| 7 | |
| 8 | export default defineConfig({ |
| 9 | plugins: [solidPlugin({ ssr: true })], |
| 10 | environments: { |
| 11 | ssr: { |
| 12 | build: { |
| 13 | emptyOutDir: false, |
| 14 | rolldownOptions: { |
| 15 | input: resolve(__dirname, "src/entry-server.tsx"), |
| 16 | }, |
| 17 | }, |
| 18 | }, |
| 19 | }, |
| 20 | }); |