mirror of
https://github.com/actualbudget/actual.git
synced 2026-07-26 02:43:26 -05:00
* [AI] Disable bundle minification for readable production error messages The desktop-client had dead terserOptions (no `minify: 'terser'` was set, so Vite's default esbuild minifier ran with name mangling). The loot-core and plugins-service workers used Terser with mangle:false but still compressed. Set `minify: false` across all three browser build configs so production stack traces are human-readable. https://claude.ai/code/session_01VEywxebiNYAgJia35fygQx * [AI] Rename release note to match PR number https://claude.ai/code/session_01VEywxebiNYAgJia35fygQx --------- Co-authored-by: Claude <noreply@anthropic.com>
30 lines
643 B
TypeScript
30 lines
643 B
TypeScript
import path from 'path';
|
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const isDev = mode === 'development';
|
|
const outDir = path.resolve(__dirname, 'dist');
|
|
|
|
return {
|
|
mode,
|
|
build: {
|
|
target: 'es2020',
|
|
outDir,
|
|
emptyOutDir: true,
|
|
lib: {
|
|
entry: path.resolve(__dirname, 'src/plugin-service-worker.ts'),
|
|
name: 'plugin_sw',
|
|
formats: ['iife'],
|
|
fileName: () => `plugin-sw.js`,
|
|
},
|
|
sourcemap: true,
|
|
minify: false,
|
|
},
|
|
define: {
|
|
'process.env': '{}',
|
|
'process.env.IS_DEV': JSON.stringify(isDev),
|
|
},
|
|
};
|
|
});
|