Initial commit
This commit is contained in:
commit
af2f593fb8
66 changed files with 8735 additions and 0 deletions
59
vite.config.ts
Normal file
59
vite.config.ts
Normal file
|
@ -0,0 +1,59 @@
|
|||
import { paraglideVitePlugin } from '@inlang/paraglide-js';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import { svelteTesting } from '@testing-library/svelte/vite';
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
tailwindcss(),
|
||||
sveltekit(),
|
||||
paraglideVitePlugin({
|
||||
project: './project.inlang',
|
||||
outdir: './src/lib/paraglide'
|
||||
})
|
||||
],
|
||||
build: {
|
||||
minify: 'esbuild',
|
||||
cssCodeSplit: false,
|
||||
chunkSizeWarningLimit: 550,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
// assetFileNames: '[hash][extname]',
|
||||
entryFileNames: `[hash][extname]`,
|
||||
chunkFileNames: `[hash][extname]`,
|
||||
assetFileNames: `[hash][extname]`,
|
||||
preserveModules: false,
|
||||
|
||||
manualChunks: () => {
|
||||
return 'app';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
test: {
|
||||
workspace: [
|
||||
{
|
||||
extends: './vite.config.ts',
|
||||
plugins: [svelteTesting()],
|
||||
test: {
|
||||
name: 'client',
|
||||
environment: 'jsdom',
|
||||
clearMocks: true,
|
||||
include: ['src/**/*.svelte.{test,spec}.{js,ts}'],
|
||||
exclude: ['src/lib/server/**'],
|
||||
setupFiles: ['./vitest-setup-client.ts']
|
||||
}
|
||||
},
|
||||
{
|
||||
extends: './vite.config.ts',
|
||||
test: {
|
||||
name: 'server',
|
||||
environment: 'node',
|
||||
include: ['src/**/*.{test,spec}.{js,ts}'],
|
||||
exclude: ['src/**/*.svelte.{test,spec}.{js,ts}']
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue