Vite Frontend Tooling taste
# Vite Frontend Tooling taste of a fast-feedback web developer - Start new single-page apps and component playgrounds on Vite with the official framework plugin instead of a custom webpack setup. Confidence: 0.85 -…
Open the source (opens github.com) https://github.com/f/prompts.chat
What it is
Prompts from f.
The problem it solves and who it suits haven't been reviewed by InnerVault. The description above is the source's own.
The prompt
# Vite Frontend Tooling taste of a fast-feedback web developer - Start new single-page apps and component playgrounds on Vite with the official framework plugin instead of a custom webpack setup. Confidence: 0.85 - Keep `vite.config.ts` in TypeScript with `defineConfig`, and keep it short enough to read in one screen. Confidence: 0.80 - Run type checking separately with `tsc --noEmit` in CI and in a watcher, since Vite only strips types and never checks them. Confidence: 0.95 - Use path aliases sparingly, define them once in `tsconfig.json`, and mirror them in Vite with a plugin such as `vite-tsconfig-paths`. Confidence: 0.75 - Expose only `VITE_`-prefixed environment variables to client code and never put secrets in them. Confidence: 0.95 - Type `import.meta.env` in a `vite-env.d.ts` file so missing or misspelled variables fail at compile time. Confidence: 0.80 - Configure the dev server proxy for backend APIs instead of enabling permissive CORS on the backend just for local development. Confidence: 0.85 - Use Vitest for unit and component tests so tests share the same config, transforms and aliases as the app. Confidence: 0.90 - Lazy-load routes and heavy widgets with dynamic `import()` and let Rollup split chunks, rather than hand-tuning `manualChunks` early. Confidence: 0.80 - Inspect bundle size with `rollup-plugin-visualizer` before releases and treat a large new dependency as a review topic. Confidence: 0.75 - Import assets through the module graph so they get hashed file names, keeping `public/` for files that need fixed URLs like `robots.txt`. Confidence: 0.85 - Set an explicit `build.target` that matches the browsers you support, instead of relying on the default. Confidence: 0.70 - Generate source maps for production builds and upload them to your error tracker rather than serving them publicly. Confidence: 0.80 - Prefer native CSS features and CSS modules or Tailwind over heavy CSS-in-JS runtimes in Vite projects. Confidence: 0.70 - Keep the plugin list small and remove plugins that duplicate built-in features such as JSON imports or CSS handling. Confidence: 0.80 - Use `vite preview` to smoke-test the production build locally before deploying, since dev and build use different pipelines. Confidence: 0.85 - Pin Vite and plugin versions in the lockfile and upgrade them together, reading the migration guide for major versions. Confidence: 0.85 - Use library mode with `vite build --lib` plus a declaration generator when publishing a component package, and mark peer dependencies as external. Confidence: 0.75 - Fix slow cold starts by checking `optimizeDeps` and large barrel files before blaming Vite itself. Confidence: 0.70 - Fail CI on build warnings about circular imports or missing exports instead of letting them pile up. Confidence: 0.65
Written by the prompts.chat (CC0 prompt collection) community (f). Not tested by InnerVault.
How to get it
Setup steps: not applicable.
Related
-
Senior Frontend Developer
PromptsI want you to act as a Senior Frontend developer. I will describe a project details you will code project with this tools: Vite (React template), yarn, Ant Design, List, Redux Toolkit, createSlice, thunk, axios. You…
-
Testing taste
Prompts# Testing taste of a pragmatic TypeScript team - Use vitest as the default test runner for unit and integration tests. Confidence: 0.90 - Keep test files next to the code they cover as *.test.ts. Confidence: 0.85 -…
-
Tauri Desktop App taste
Prompts# Tauri Desktop App taste of a cross-platform desktop developer - Choose Tauri over Electron for new desktop apps when bundle size and memory use matter. Confidence: 0.80 - Build the frontend with Vite and TypeScript…
-
Vue App taste
Prompts# Vue App taste of a frontend engineer - Start new projects with Vite and Vue 3, or Nuxt when server rendering or file-based routing is needed. Confidence: 0.90 - Write components with script setup and the Composition…
-
aa/cli taste
Prompts# Cli taste of AA - Use pnpm as the package manager for CLI projects. Confidence: 1.00 - Use TypeScript for CLI projects. Confidence: 0.95 - Use tsup as the build tool for CLI projects. Confidence: 0.95 - Use vitest…
-
You are a senior frontend engineer specialized in debugging Single Page Applications (SPA). Context: The user will provide: - A description of the problem - The framework used (Angular, React, Vite, etc.) - Deployment…