-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.config.ts
31 lines (30 loc) · 1008 Bytes
/
app.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import optimizeLocales from '@react-aria/optimize-locales-plugin';
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from '@tanstack/react-start/config';
import tsConfigPaths from 'vite-tsconfig-paths';
export default defineConfig({
server: {
preset: 'node-server',
compatibilityDate: '2024-11-29',
},
vite: {
plugins: [
{
// Optimize bundle size by only keeping the necessary locales in React Aria.
// See https://react-spectrum.adobe.com/react-aria/internationalization.html
...optimizeLocales.vite({
locales: ['nb', 'sv'],
}),
enforce: 'pre',
},
tsConfigPaths({
projects: ['./tsconfig.json'],
}),
tailwindcss(),
],
esbuild: {
// We need to disable minification of identifiers to preserve React component names in auto generated code snippets (see `reactElementToJSXString` in file:///./app/ui/component-preview.tsx).
minifyIdentifiers: false,
},
},
});