···1+# @config/vite-base
2+3+Base configuration for Vite and Vitest.
4+5+## Installation
6+7+```bash
8+pnpm add -D @config/vite-base
9+```
10+11+## Usage
12+13+To use the base configuration in your vitest.config.ts:
14+15+```ts
16+// vitest.config.ts
17+import { createVitestConfig } from '@config/vite-base';
18+19+export default createVitestConfig({
20+ // Your specific configuration
21+});
22+```
23+24+To use the base configuration in your vite.config.ts:
25+26+```ts
27+// vite.config.ts
28+import { createViteConfig } from '@config/vite-base';
29+30+export default createViteConfig({
31+ // Your specific configuration
32+ plugins: [react()], // Example
33+});
34+```
35+36+## Implementation
37+38+To complete the implementation of this package in the workspace:
39+40+1. Build the package:
41+42+ ```bash
43+ cd packages/configs/vite-base
44+ pnpm install
45+ pnpm build
46+ ```
47+48+2. Add it as a dependency to your packages:
49+50+ ```bash
51+ cd <your-package>
52+ pnpm add -D @config/vite-base@workspace:*
53+ ```
54+55+3. Update your vitest.config.ts and vite.config.ts files to use the base configurations.
···1import { fileURLToPath } from 'node:url';
23-import { defineConfig } from 'vitest/config';
45-export default defineConfig({
6- plugins: [],
7- test: {
8- // Dont run tests in parallel. This is to ensure the test server can start up.
9- // And that the port was not previously taken.
10- fileParallelism: false,
11- include: ['test/e2e/**/*.test.ts'],
12- root: fileURLToPath(new URL('./', import.meta.url)),
013 },
14-});
···1import { fileURLToPath } from 'node:url';
23+import { createVitestConfig } from '@config/vite-base';
45+export default createVitestConfig(
6+ fileURLToPath(new URL('./', import.meta.url)),
7+ {
8+ test: {
9+ // Dont run tests in parallel. This is to ensure the test server can start up.
10+ // And that the port was not previously taken.
11+ fileParallelism: false,
12+ include: ['test/e2e/**/*.test.ts'],
13+ },
14 },
15+);