demarches-normaliennes/vite.config.ts

27 lines
667 B
TypeScript
Raw Normal View History

2022-06-17 12:36:21 +02:00
import { defineConfig } from 'vite';
import ViteReact from '@vitejs/plugin-react';
import RubyPlugin from 'vite-plugin-ruby';
2024-03-04 16:35:09 +01:00
import FullReload from 'vite-plugin-full-reload';
2024-05-06 18:07:29 +02:00
import optimizeLocales from '@react-aria/optimize-locales-plugin';
2022-06-17 12:36:21 +02:00
const plugins = [
RubyPlugin(),
2024-05-06 18:07:29 +02:00
ViteReact(),
FullReload(
['config/routes.rb', 'app/views/**/*', 'app/components/**/*.haml'],
{ delay: 200 }
2024-05-06 18:07:29 +02:00
),
{
...optimizeLocales.vite({
locales: ['en-GB', 'fr-FR']
}),
enforce: 'pre' as const
}
];
export default defineConfig({
resolve: { alias: { '@utils': '/shared/utils.ts' } },
2024-05-30 22:18:57 +02:00
build: { sourcemap: true, assetsInlineLimit: 0 },
plugins
2022-06-17 12:36:21 +02:00
});