mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-08 07:12:49 +00:00
* core startup error handling * lazy load `PasswordMeter` so that the huge `@zxcvbn-ts` isn't in the core bundle * please clippy --------- Co-authored-by: Brendan Allan <brendonovich@outlook.com>
39 lines
816 B
TypeScript
39 lines
816 B
TypeScript
import { relativeAliasResolver } from '@sd/config/vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import { visualizer } from 'rollup-plugin-visualizer';
|
|
import { defineConfig } from 'vite';
|
|
import { createHtmlPlugin } from 'vite-plugin-html';
|
|
import svg from 'vite-plugin-svgr';
|
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
import { name, version } from './package.json';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
server: {
|
|
port: 8002
|
|
},
|
|
plugins: [
|
|
tsconfigPaths(),
|
|
react(),
|
|
svg({ svgrOptions: { icon: true } }),
|
|
createHtmlPlugin({
|
|
minify: true
|
|
}),
|
|
visualizer({
|
|
gzipSize: true,
|
|
brotliSize: true
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: [relativeAliasResolver]
|
|
},
|
|
root: 'src',
|
|
define: {
|
|
pkgJson: { name, version }
|
|
},
|
|
build: {
|
|
outDir: '../dist',
|
|
assetsDir: '.'
|
|
}
|
|
});
|