standard-cv/vite.config.ts
Tudor Stanciu 6a183d479a Merged PR 105: Full upgrade: Vite and Typescript migration
feat: add mock CV data and setup testing environment

- Created a mock CV data file for testing purposes.
- Added a setup file for testing with @testing-library/jest-dom.
- Implemented a ThemeProvider component to manage themes and favicons.
- Added unit tests for theme utility functions.
- Replaced JavaScript theme constants with TypeScript constants.
- Refactored theme hooks to TypeScript and improved favicon handling.
- Removed deprecated JavaScript files and replaced them with TypeScript equivalents.
- Introduced a new TypeScript types file for better type safety.
- Set up TypeScript configuration files for the project.
- Configured Vite for building and testing the project.
2025-08-10 15:30:08 +00:00

43 lines
922 B
TypeScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import dts from "vite-plugin-dts";
import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js";
import path from "path";
export default defineConfig({
plugins: [
react(),
cssInjectedByJsPlugin(),
dts({
insertTypesEntry: true,
include: ["src/**/*"],
exclude: ["src/**/*.test.*", "src/**/*.spec.*"],
}),
],
build: {
lib: {
entry: path.resolve(__dirname, "src/index.ts"),
name: "StandardCV",
formats: ["es"],
fileName: "index",
},
rollupOptions: {
external: ["react", "react-dom"],
output: {
globals: {
react: "React",
"react-dom": "ReactDOM",
},
},
},
sourcemap: true,
minify: "esbuild",
cssCodeSplit: false,
},
css: {
modules: {
localsConvention: "camelCase",
},
},
});