2022-02-23 15:01:52 -08:00
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
import react from '@vitejs/plugin-react';
|
2022-02-25 15:02:24 -08:00
|
|
|
import { visualizer } from 'rollup-plugin-visualizer';
|
2022-10-19 15:11:31 -07:00
|
|
|
import { VitePWA } from 'vite-plugin-pwa';
|
2022-02-23 15:01:52 -08:00
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2022-02-25 15:34:14 -08:00
|
|
|
build: {
|
|
|
|
outDir: 'build', // This changes the out put dir from dist to build
|
2022-10-18 07:31:00 -07:00
|
|
|
sourcemap: true,
|
2022-02-25 15:34:14 -08:00
|
|
|
rollupOptions: {
|
|
|
|
output: {
|
|
|
|
manualChunks: {
|
|
|
|
react: ['react', 'react-dom'],
|
|
|
|
antdResult: ['antd/es/result'],
|
|
|
|
antdTable: ['antd/es/table'],
|
|
|
|
antdIcons: ['@ant-design/icons'],
|
|
|
|
uplot: ['uplot'],
|
|
|
|
sentry: ['@sentry/react', '@sentry/browser', '@sentry/tracing'],
|
|
|
|
kbar: ['kbar'],
|
|
|
|
perfectScrollbar: ['perfect-scrollbar'],
|
2022-10-19 14:56:19 -07:00
|
|
|
pako: ['pako'],
|
2022-02-25 15:34:14 -08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-07-17 11:55:10 -07:00
|
|
|
server: {
|
|
|
|
open: true,
|
|
|
|
host: '0.0.0.0',
|
|
|
|
},
|
2022-02-23 15:01:52 -08:00
|
|
|
css: {
|
|
|
|
preprocessorOptions: {
|
|
|
|
less: { javascriptEnabled: true },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
react(),
|
2022-02-25 15:02:24 -08:00
|
|
|
visualizer(),
|
2022-10-19 15:11:31 -07:00
|
|
|
VitePWA({
|
|
|
|
registerType: 'autoUpdate',
|
|
|
|
devOptions: {
|
|
|
|
enabled: true,
|
|
|
|
},
|
2022-10-19 15:37:10 -07:00
|
|
|
includeAssets: ['icons/icon.ico', 'icons/icon.png'],
|
2022-10-19 15:11:31 -07:00
|
|
|
manifest: {
|
|
|
|
name: 'HyperTuner Cloud',
|
2022-10-19 15:35:06 -07:00
|
|
|
short_name: 'HyperTuner Cloud',
|
2022-10-19 15:11:31 -07:00
|
|
|
description: 'HyperTuner Cloud - Share your tunes and logs',
|
|
|
|
start_url: '.',
|
|
|
|
display: 'standalone',
|
|
|
|
theme_color: '#191C1E',
|
|
|
|
background_color: '#191C1E',
|
|
|
|
icons: [
|
|
|
|
{
|
|
|
|
src: '/icons/icon.ico',
|
|
|
|
type: 'image/x-icon',
|
|
|
|
sizes: '256x256',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
src: '/icons/icon.png',
|
|
|
|
type: 'image/png',
|
|
|
|
sizes: '512x512',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
screenshots: [
|
|
|
|
{
|
|
|
|
src: '/img/screen2.png',
|
|
|
|
sizes: '1920x1194',
|
|
|
|
type: 'image/png',
|
|
|
|
platform: 'wide',
|
|
|
|
label: 'Log viewer',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
src: '/img/screen1.png',
|
|
|
|
sizes: '1920x1194',
|
|
|
|
type: 'image/png',
|
|
|
|
platform: 'wide',
|
|
|
|
label: 'VE Table with command palette',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}),
|
2022-02-23 15:01:52 -08:00
|
|
|
],
|
|
|
|
});
|