69 lines
1.6 KiB
TypeScript
69 lines
1.6 KiB
TypeScript
import { defineConfig } from 'vite'
|
||
import react from '@vitejs/plugin-react'
|
||
import path from 'path'
|
||
import dynamicImport from 'vite-plugin-dynamic-import'
|
||
import { VitePWA } from 'vite-plugin-pwa'
|
||
|
||
// https://vitejs.dev/config/
|
||
export default defineConfig({
|
||
plugins: [
|
||
react({
|
||
babel: {
|
||
plugins: ['babel-plugin-macros', '@babel/plugin-syntax-dynamic-import'],
|
||
},
|
||
}),
|
||
dynamicImport(),
|
||
VitePWA({
|
||
registerType: 'autoUpdate',
|
||
devOptions: {
|
||
enabled: true,
|
||
},
|
||
workbox: {
|
||
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024, // 10 MB sınır
|
||
},
|
||
manifest: {
|
||
name: 'Platform',
|
||
theme_color: '#FF99C8',
|
||
background_color: '#f0e7db',
|
||
display: 'standalone',
|
||
// scope: '/',
|
||
// start_url: '/',
|
||
// orientation: 'portrait',
|
||
icons: [
|
||
{
|
||
src: '/img/logo/logo-400.png',
|
||
sizes: '400x400',
|
||
type: 'image/png',
|
||
purpose: 'any',
|
||
},
|
||
],
|
||
},
|
||
}),
|
||
// visualizer({ open: true, filename: 'bundle-visualization.html' }),
|
||
],
|
||
server: {
|
||
open: true,
|
||
port: 3000,
|
||
},
|
||
assetsInclude: ['**/*.md'],
|
||
resolve: {
|
||
alias: {
|
||
'@': path.join(__dirname, 'src'),
|
||
inferno: 'inferno/dist/index.esm.js',
|
||
'devextreme/ui': 'devextreme/esm/ui',
|
||
},
|
||
},
|
||
build: {
|
||
outDir: 'dist',
|
||
sourcemap: false,
|
||
},
|
||
preview: {
|
||
host: '0.0.0.0',
|
||
port: 80,
|
||
open: false,
|
||
allowedHosts: ['localhost', 'sozsoft.com', 'dev.sozsoft.com', 'demo.sozsoft.com'],
|
||
},
|
||
define: {
|
||
'process.env': {},
|
||
},
|
||
})
|