bob-ide / vite.config.ts
SNAPKITTYWEST's picture
push from SNAPKITTYWEST/bob-ide
0110dee verified
Raw
History Blame Contribute Delete
1.5 kB
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { VitePWA } from 'vite-plugin-pwa';
import path from 'path';
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: 'autoUpdate',
manifest: {
name: 'BOB IDE',
short_name: 'BOB',
description: 'Sovereign Coding Environment',
theme_color: '#0A6CFF',
icons: [
{
src: '/assets/icons/icon-192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: '/assets/icons/icon-512.png',
sizes: '512x512',
type: 'image/png'
}
]
}
})
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@components': path.resolve(__dirname, './src/components'),
'@stores': path.resolve(__dirname, './src/stores'),
'@lib': path.resolve(__dirname, './src/lib'),
'@types': path.resolve(__dirname, './src/types')
}
},
build: {
target: 'esnext',
rollupOptions: {
output: {
manualChunks: {
'monaco': ['monaco-editor', '@monaco-editor/react'],
'xterm': ['xterm', 'xterm-addon-fit', 'xterm-addon-web-links'],
'webllm': ['@mlc-ai/web-llm']
}
}
}
},
worker: {
format: 'es'
},
optimizeDeps: {
exclude: ['@mlc-ai/web-llm']
}
});
// Made with Bob