init
This commit is contained in:
43
astro.config.mjs
Normal file
43
astro.config.mjs
Normal file
@@ -0,0 +1,43 @@
|
||||
import { defineConfig } from 'astro/config';
|
||||
import react from "@astrojs/react";
|
||||
import tailwind from "@astrojs/tailwind";
|
||||
import { chunkSplitPlugin } from 'vite-plugin-chunk-split';
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
output: 'static',
|
||||
// Use client:only for all React components
|
||||
integrations: [
|
||||
react({ ssr: false }), // Disable SSR for React components
|
||||
tailwind()
|
||||
],
|
||||
vite: {
|
||||
plugins: [
|
||||
chunkSplitPlugin({
|
||||
strategy: 'default',
|
||||
customSplitting: {
|
||||
'ui-components': [/src\/components\/ui\/.*/],
|
||||
'contexts': [/src\/contexts\/.*/],
|
||||
'utils': [/src\/utils\/.*/],
|
||||
'document-extraction': [/src\/utils\/documentExtraction.ts/],
|
||||
'mongo-sync': [/src\/utils\/mongoSync.ts/],
|
||||
'react-vendor': ['react', 'react-dom']
|
||||
}
|
||||
})
|
||||
],
|
||||
// Avoid hydration issues with different Node.js environments
|
||||
ssr: {
|
||||
noExternal: ['@radix-ui/*', 'class-variance-authority']
|
||||
},
|
||||
build: {
|
||||
chunkSizeWarningLimit: 1000,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
'pdf-lib': ['pdfjs-dist']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user