style(design): apply Minimal Dark Mode design system\n\n- Switched to complete Dark Mode (OLED-friendly)\n- Established standard color palette matching modern technical aesthetics\n- Changed font to Plus Jakarta Sans for increased legibility\n- Enforced dark mode as default in App.tsx\n- Fixed several React cascading render (setState in useEffect) warnings
This commit is contained in:
1 parent
b80531f8a8
commit
bac7b5591e
738 files changed
+138513
-138123
No files matched your search
+62
-62
@@ -1,62 +1,62 @@
|
||||
import { defineConfig, loadEnv } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import { tanstackRouter } from '@tanstack/router-plugin/vite';
|
||||
import path from 'path';
|
||||
import { codeInspectorPlugin } from 'code-inspector-plugin';
|
||||
import { sentryVitePlugin } from '@sentry/vite-plugin';
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd(), '');
|
||||
const sentryAuthToken = process.env.SENTRY_AUTH_TOKEN || env.SENTRY_AUTH_TOKEN;
|
||||
const shouldEnableSentry = mode === 'production' && Boolean(sentryAuthToken);
|
||||
|
||||
return {
|
||||
plugins: [
|
||||
...(shouldEnableSentry
|
||||
? [
|
||||
sentryVitePlugin({
|
||||
org: process.env.SENTRY_ORG || env.SENTRY_ORG,
|
||||
project: process.env.SENTRY_PROJECT || env.SENTRY_PROJECT,
|
||||
authToken: sentryAuthToken,
|
||||
release: {
|
||||
name: `${process.env.npm_package_name}@${process.env.npm_package_version}`,
|
||||
},
|
||||
// Electron loads files from app://, so we need to normalize paths for Source Map matching
|
||||
sourcemaps: {
|
||||
// Rewrite the source paths to strip the Electron app:// protocol
|
||||
rewriteSources: (source) => {
|
||||
// Transform: app:///.vite/renderer/main_window/assets/index.js
|
||||
// Into: ~/.vite/renderer/main_window/assets/index.js
|
||||
return source.replace(/^app:\/\/\//, '~/');
|
||||
},
|
||||
},
|
||||
}),
|
||||
]
|
||||
: []),
|
||||
tanstackRouter({
|
||||
target: 'react',
|
||||
autoCodeSplitting: true,
|
||||
}),
|
||||
tailwindcss(),
|
||||
react({
|
||||
babel: {
|
||||
plugins: ['babel-plugin-react-compiler'],
|
||||
},
|
||||
}),
|
||||
codeInspectorPlugin({ bundler: 'vite' }),
|
||||
],
|
||||
optimizeDeps: {
|
||||
entries: ['index.html'],
|
||||
},
|
||||
define: {
|
||||
'process.env.SENTRY_DSN': JSON.stringify(process.env.SENTRY_DSN || env.SENTRY_DSN),
|
||||
},
|
||||
resolve: {
|
||||
preserveSymlinks: true,
|
||||
alias: {
|
||||
'@': path.resolve(process.cwd(), './src'),
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
import { defineConfig, loadEnv } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import { tanstackRouter } from '@tanstack/router-plugin/vite';
|
||||
import path from 'path';
|
||||
import { codeInspectorPlugin } from 'code-inspector-plugin';
|
||||
import { sentryVitePlugin } from '@sentry/vite-plugin';
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd(), '');
|
||||
const sentryAuthToken = process.env.SENTRY_AUTH_TOKEN || env.SENTRY_AUTH_TOKEN;
|
||||
const shouldEnableSentry = mode === 'production' && Boolean(sentryAuthToken);
|
||||
|
||||
return {
|
||||
plugins: [
|
||||
...(shouldEnableSentry
|
||||
? [
|
||||
sentryVitePlugin({
|
||||
org: process.env.SENTRY_ORG || env.SENTRY_ORG,
|
||||
project: process.env.SENTRY_PROJECT || env.SENTRY_PROJECT,
|
||||
authToken: sentryAuthToken,
|
||||
release: {
|
||||
name: `${process.env.npm_package_name}@${process.env.npm_package_version}`,
|
||||
},
|
||||
// Electron loads files from app://, so we need to normalize paths for Source Map matching
|
||||
sourcemaps: {
|
||||
// Rewrite the source paths to strip the Electron app:// protocol
|
||||
rewriteSources: (source) => {
|
||||
// Transform: app:///.vite/renderer/main_window/assets/index.js
|
||||
// Into: ~/.vite/renderer/main_window/assets/index.js
|
||||
return source.replace(/^app:\/\/\//, '~/');
|
||||
},
|
||||
},
|
||||
}),
|
||||
]
|
||||
: []),
|
||||
tanstackRouter({
|
||||
target: 'react',
|
||||
autoCodeSplitting: true,
|
||||
}),
|
||||
tailwindcss(),
|
||||
react({
|
||||
babel: {
|
||||
plugins: ['babel-plugin-react-compiler'],
|
||||
},
|
||||
}),
|
||||
codeInspectorPlugin({ bundler: 'vite' }),
|
||||
],
|
||||
optimizeDeps: {
|
||||
entries: ['index.html'],
|
||||
},
|
||||
define: {
|
||||
'process.env.SENTRY_DSN': JSON.stringify(process.env.SENTRY_DSN || env.SENTRY_DSN),
|
||||
},
|
||||
resolve: {
|
||||
preserveSymlinks: true,
|
||||
alias: {
|
||||
'@': path.resolve(process.cwd(), './src'),
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
Reference in new issue
Block a user