mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-21 15:36:50 -05:00
* Enforce JSX file extensions for React components - Update eslint config to enforce .jsx/.tsx extensions for files containing JSX - Convert docs package JS files to JSX where they contain React code - Fix unstable nested components in CrossoverGraph and NetWorthGraph - Update oxlint configuration - Update e2e fixtures * Fix: Rename react-hooks/exhaustive-deps to react/exhaustive-deps Co-authored-by: matiss <matiss@mja.lv> * Enhance ESLint configuration and update import rules * Refactor ESLint configuration to enhance import order rules and add eslint-plugin-import * Fix ESLint directive comments in API files to use correct syntax * Fix * Fix ESLint directive comments and update import/extensions rule in configuration * Refactor ESLint configuration to enforce JSX extension rules and improve code clarity * Update ESLint configuration: disable 'import/no-unresolved' rule and remove obsolete .oxlintrc.json file --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
60 lines
1.4 KiB
TypeScript
60 lines
1.4 KiB
TypeScript
import path from 'path';
|
|
|
|
import { visualizer } from 'rollup-plugin-visualizer';
|
|
import { defineConfig } from 'vite';
|
|
import peggyLoader from 'vite-plugin-peggy-loader';
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const outDir = path.resolve(__dirname, 'lib-dist/electron');
|
|
const crdtDir = path.resolve(__dirname, '../crdt');
|
|
|
|
return {
|
|
mode,
|
|
ssr: { noExternal: true, external: ['better-sqlite3'] },
|
|
build: {
|
|
target: 'node18',
|
|
outDir,
|
|
emptyOutDir: true,
|
|
ssr: true,
|
|
lib: {
|
|
entry: path.resolve(__dirname, 'src/server/main.ts'),
|
|
formats: ['cjs'],
|
|
},
|
|
sourcemap: true,
|
|
rollupOptions: {
|
|
output: {
|
|
entryFileNames: 'bundle.desktop.js',
|
|
format: 'cjs',
|
|
name: 'desktop',
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
extensions: [
|
|
'.electron.js',
|
|
'.electron.ts',
|
|
'.electron.tsx',
|
|
'.js',
|
|
'.ts',
|
|
'.tsx',
|
|
'.json',
|
|
'.pegjs',
|
|
],
|
|
alias: [
|
|
{
|
|
find: 'handlebars',
|
|
replacement: require.resolve('handlebars/dist/handlebars.js'),
|
|
},
|
|
{
|
|
find: /^@actual-app\/crdt(\/.*)?$/,
|
|
replacement: path.resolve(crdtDir, 'src') + '$1',
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
peggyLoader(),
|
|
visualizer({ template: 'raw-data', filename: `${outDir}/stats.json` }),
|
|
],
|
|
};
|
|
});
|