2023-01-03 08:39:03 +01:00
|
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
import { resolve } from 'path';
|
|
|
|
import { defineConfig } from 'vite';
|
2024-04-12 04:57:26 +02:00
|
|
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
2023-01-03 08:39:03 +01:00
|
|
|
|
|
|
|
export default defineConfig({
|
2024-04-12 04:57:26 +02:00
|
|
|
plugins: [ react(), tsconfigPaths() ],
|
2023-01-03 08:39:03 +01:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'@': resolve(__dirname, 'src'),
|
|
|
|
'~': resolve(__dirname, 'node_modules')
|
|
|
|
}
|
|
|
|
},
|
|
|
|
build: {
|
|
|
|
assetsInlineLimit: 102400,
|
2024-03-27 03:47:58 +01:00
|
|
|
chunkSizeWarningLimit: 200000,
|
2023-01-03 08:39:03 +01:00
|
|
|
rollupOptions: {
|
|
|
|
output: {
|
|
|
|
assetFileNames: 'src/assets/[name].[ext]',
|
|
|
|
manualChunks: id =>
|
|
|
|
{
|
|
|
|
if(id.includes('node_modules'))
|
|
|
|
{
|
|
|
|
if(id.includes('@nitrots/nitro-renderer')) return 'nitro-renderer';
|
|
|
|
|
|
|
|
return 'vendor';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|