Files
Reactive-Resume/vite.config.ts
T
Luka Fagundes 3e16586d7a feat(jobs): add job listings with AI-powered resume tailoring (#2788)
* feat: add job listings feature with JSearch API integration, resume tailoring, and per-user rate limiting

* feat(jobs): add search filters UI, filter helper functions with tests, and job_search_quota DB migration

* feat(jobs): add pagination with 30 results per page and prev/next navigation

* refactor(job-detail): Adjust sheet width and scroll area height

* feat(ai): Add resume tailoring feature and prompt

* refactor(ai): Revise tailoring prompts and schema for full skill rewrite

* feat(ai): Add reference tailoring and output sanitization

* feat(testing): Add Vitest testing framework

* fix: address PR review - atomic rate limiting, calendar-month quota, skill sync warning, gitignore routeTree.gen.ts

* feat(jobs): Add location filter to job listings

* feat(job-listings): Add DOCX document generation

* feat(job-listings): Enable search by location and on Enter key

* feat(job-listings): Split location filter into city, state, and country

* feat(jobs): Implement job search adapter and JSearch

* Update 'locale/' directory

* feat(resume): Simplify filename generation and add tests

* fix(JSearch): reduce JSearch API usage to 1 request per search to prevent quota exhaustion

* fix(JSearch): Displayed quota amounts on Job Search functionality and settings fixed to pull from RapidAPI/JSearch response

* fix(internal rate limit): Removed internal rate limit and .env.example addition, cloud based implementation handles.

* style(job-filters): Adjust layout of switch filters

* fix(typecheck): Fixed typecheck issues introduced to sync with origin

* feat(jobs): Enhance tailor dialog with apply link and tags

* feat(locale files): updated locale files with the latest build

* feat(jobs): Add job search provider and integrate testing functionality

- Introduced `createJobSearchProvider` function to instantiate a JSearchProvider.
- Enhanced job search provider with methods for searching jobs, retrieving job details, and testing connection.
- Updated `vite.config.ts` to include new testing configurations and plugins.
- Added new dependencies in `package.json` for testing and document generation.
- Removed obsolete `vitest.config.ts` file.
- Improved job search provider tests for better coverage and reliability.

* refactor: Update job search routes and remove obsolete test configurations

- Removed the test configuration from `vite.config.ts`.
- Updated localization files to reflect changes in job search routes, renaming references from `jobs` to `job-search` across multiple languages.
- Adjusted autofix workflow to run formatting without the `--fix` flag for better control over code style adjustments.

* chore: Update dependencies and improve animation performance

- Added `jsdom` as a new dependency in `package.json`.
- Updated `vite-plus` and `vitest` to the latest versions for better compatibility.
- Enhanced animation components with `willChange` styles to optimize rendering performance.
- Adjusted various UI components to improve responsiveness and visual effects.
- Removed obsolete job details functionality from the job search provider and related tests.

* chore(locales): Update localization files for job search improvements

- Modified job search related strings to remove references to "this month" for a more concise format.
- Updated file references in localization entries to reflect changes in the job search component structure.
- Added new strings for API usage, quota remaining, and job fetching error messages across multiple languages.
- Removed obsolete "Monthly Usage" string from localization files.

* chore(dependencies): Update @typescript/native-preview to version 7.0.0-dev.20260319.1

---------

Co-authored-by: Amruth Pillai <im.amruth@gmail.com>
2026-03-19 09:48:02 +01:00

243 lines
6.0 KiB
TypeScript

import type { PluginOption } from "vite-plus";
import { lingui } from "@lingui/vite-plugin";
import babel from "@rolldown/plugin-babel";
import tailwindcss from "@tailwindcss/vite";
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import viteReact from "@vitejs/plugin-react";
import { nitro } from "nitro/vite";
import { VitePWA } from "vite-plugin-pwa";
import { defineConfig } from "vite-plus";
const isVitest = Boolean(process.env.VITEST);
const plugins: PluginOption[] = [tanstackStart({ router: { semicolons: true, quoteStyle: "double" } }), viteReact()];
if (!isVitest) {
plugins.push(
lingui(),
tailwindcss(),
nitro({ plugins: ["plugins/1.migrate.ts"] }),
babel({ plugins: ["@lingui/babel-plugin-lingui-macro"] }),
VitePWA({
outDir: "public",
useCredentials: true,
injectRegister: false,
includeAssets: ["**/*"],
registerType: "autoUpdate",
workbox: {
skipWaiting: true,
clientsClaim: true,
globPatterns: ["**/*"],
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024, // 10mb
navigateFallback: null, // Disable navigation fallback for SSR
},
manifest: {
name: "Reactive Resume",
short_name: "Reactive Resume",
description: "A free and open-source resume builder.",
id: "/?source=pwa",
start_url: "/?source=pwa",
display: "standalone",
orientation: "portrait",
theme_color: "#09090B",
background_color: "#09090B",
icons: [
{
src: "favicon.ico",
sizes: "128x128",
type: "image/x-icon",
},
{
src: "pwa-64x64.png",
sizes: "64x64",
type: "image/png",
},
{
src: "pwa-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "any",
},
{
src: "maskable-icon-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
screenshots: [
{
src: "screenshots/web/1-landing-page.webp",
sizes: "1920x1080 any",
type: "image/webp",
form_factor: "wide",
label: "Landing Page",
},
{
src: "screenshots/web/2-resume-dashboard.webp",
sizes: "1920x1080 any",
type: "image/webp",
form_factor: "wide",
label: "Resume Dashboard",
},
{
src: "screenshots/web/3-builder-screen.webp",
sizes: "1920x1080 any",
type: "image/webp",
form_factor: "wide",
label: "Builder Screen",
},
{
src: "screenshots/web/4-template-gallery.webp",
sizes: "1920x1080 any",
type: "image/webp",
form_factor: "wide",
label: "Template Gallery",
},
{
src: "screenshots/mobile/1-landing-page.webp",
sizes: "1284x2778 any",
type: "image/webp",
form_factor: "narrow",
label: "Landing Page",
},
{
src: "screenshots/mobile/2-resume-dashboard.webp",
sizes: "1284x2778 any",
type: "image/webp",
form_factor: "narrow",
label: "Resume Dashboard",
},
{
src: "screenshots/mobile/3-builder-screen.webp",
sizes: "1284x2778 any",
type: "image/webp",
form_factor: "narrow",
label: "Builder Screen",
},
{
src: "screenshots/mobile/4-template-gallery.webp",
sizes: "1284x2778 any",
type: "image/webp",
form_factor: "narrow",
label: "Template Gallery",
},
],
categories: [
"ai",
"builder",
"business",
"career",
"cv",
"editor",
"free",
"generator",
"job-search",
"multilingual",
"open-source",
"privacy",
"productivity",
"resume",
"self-hosted",
"templates",
"utilities",
"writing",
],
},
}),
);
}
const config = defineConfig({
plugins,
staged: {
"*": "vp check --fix",
},
fmt: {
printWidth: 120,
ignorePatterns: ["routeTree.gen.ts"],
sortPackageJson: {
sortScripts: true,
},
sortTailwindcss: {
stylesheet: "./src/styles/globals.css",
functions: ["clsx", "cva", "cn"],
},
sortImports: {
groups: [
"type-import",
["value-builtin", "value-external"],
"type-internal",
"value-internal",
["type-parent", "type-sibling", "type-index"],
["value-parent", "value-sibling", "value-index"],
"unknown",
],
},
},
lint: {
env: { builtin: true },
ignorePatterns: ["routeTree.gen.ts"],
options: { typeAware: true, typeCheck: true },
settings: {
react: {
version: "19",
linkComponents: ["Link"],
},
},
plugins: [
"eslint",
"typescript",
"unicorn",
"oxc",
"react",
"react-perf",
"import",
"jsdoc",
"node",
"promise",
"vitest",
],
rules: {
"react/exhaustive-deps": "off",
"jest/require-to-throw-message": "off",
"typescript/consistent-type-imports": "error",
},
},
define: {
__APP_VERSION__: JSON.stringify(process.env.npm_package_version),
},
resolve: {
tsconfigPaths: true,
},
build: {
sourcemap: true,
chunkSizeWarningLimit: 10 * 1024, // 10mb
},
server: {
host: true,
port: 3000,
strictPort: true,
allowedHosts: true,
hmr: {
host: "localhost",
port: 3000,
},
},
});
export default config;