2024-05-13 03:12:58 -05:00
|
|
|
import react from '@vitejs/plugin-react-swc';
|
2024-04-12 11:52:19 -05:00
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
import { viteSingleFile } from 'vite-plugin-singlefile';
|
|
|
|
import svgr from 'vite-plugin-svgr';
|
|
|
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
root: './ui-src',
|
2024-05-13 03:12:58 -05:00
|
|
|
plugins: [svgr(), react(), viteSingleFile({ removeViteModuleLoader: true }), tsconfigPaths()],
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'react': 'preact/compat',
|
|
|
|
'react-dom': 'preact/compat',
|
|
|
|
'!../css/base.css': '../css/base.css'
|
|
|
|
}
|
|
|
|
},
|
2024-04-12 11:52:19 -05:00
|
|
|
build: {
|
2024-05-13 03:12:58 -05:00
|
|
|
emptyOutDir: false,
|
2024-04-12 11:52:19 -05:00
|
|
|
target: 'esnext',
|
2024-05-13 03:12:58 -05:00
|
|
|
reportCompressedSize: false,
|
|
|
|
outDir: '../dist'
|
2024-04-12 11:52:19 -05:00
|
|
|
}
|
|
|
|
});
|