Nord-themed dark/light mode family tree theme with: - Floating glass-morphism header bar - Auto/light/dark theme toggle with Lucide icons - Smart SVG logo with theme-aware fill colors - Active page highlighting with per-menu Nord icon colors - Language button showing 2-letter abbreviation - Start page search form - Mobile responsive icon-only nav - Custom views inherited from ArgonLight
42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
import { defineConfig } from 'vite';
|
|
import path from 'path';
|
|
|
|
export default defineConfig(({ command, mode }) => {
|
|
const isProd = mode === 'production';
|
|
|
|
return {
|
|
base: './',
|
|
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
quietDeps: true,
|
|
},
|
|
}
|
|
},
|
|
|
|
build: {
|
|
outDir: 'resources',
|
|
emptyOutDir: false,
|
|
sourcemap: 'inline',
|
|
minify: isProd,
|
|
esbuild: {
|
|
legalComments: 'inline',
|
|
},
|
|
rollupOptions: {
|
|
input: {
|
|
'theme': path.resolve(__dirname, 'src/scss/main.scss'),
|
|
'fonts': path.resolve(__dirname, 'src/scss/fonts.scss'),
|
|
// imports.css references webtrees vendor path — build separately when deployed
|
|
// 'imports': path.resolve(__dirname, 'src/css/imports.css'),
|
|
},
|
|
output: {
|
|
entryFileNames: `js/[name].js`,
|
|
chunkFileNames: `js/[name].js`,
|
|
assetFileNames: '[ext]/[name].[ext]'
|
|
}
|
|
}
|
|
}
|
|
};
|
|
});
|