Skip to content

Instantly share code, notes, and snippets.

@ageyev
Created August 15, 2023 03:02
Show Gist options
  • Save ageyev/56f6ef41e5a42accca7b47f7bed2ce8a to your computer and use it in GitHub Desktop.
Save ageyev/56f6ef41e5a42accca7b47f7bed2ce8a to your computer and use it in GitHub Desktop.
vite.config.ts for react app -> gitlab pages
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
server: {
open: true
},
base: "./",
root: "./root",
build: {
assetsDir: "assets", // default
outDir: "../build", //
sourcemap: true
},
test: {
globals: true,
environment: "jsdom",
setupFiles: "src/setupTests",
mockReset: true
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment