[PR #2825] [MERGED] Enable compress to avoid minified scripts from throwing SyntaxError in safari16 #4533

Closed
opened 2026-02-28 20:57:14 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/2825
Author: @chinalichen
Created: 6/3/2024
Status: Merged
Merged: 6/7/2024
Merged by: @twk3

Base: masterHead: fix/swc-minify


📝 Commits (1)

  • e148b0d Enable compress without dropping debugger to avoid SyntaxError in safari 16 {to #1766}

📊 Changes

2 files changed (+9 additions, -1 deletions)

View changed files

📝 packages/loot-core/webpack/webpack.browser.config.js (+3 -1)
upcoming-release-notes/2825.md (+6 -0)

📄 Description

Fixes #1766

The worker script kcab.worker.$HASH.js which minified by swcMinify includes functions like function e(e,t=0){}. Run this function in safari 16 will throw SyntaxError
image

Enable compress for swcMinify will remove useless function name e in function e(e,t=0){}. You can try compress flags in this swc playground.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/2825 **Author:** [@chinalichen](https://github.com/chinalichen) **Created:** 6/3/2024 **Status:** ✅ Merged **Merged:** 6/7/2024 **Merged by:** [@twk3](https://github.com/twk3) **Base:** `master` ← **Head:** `fix/swc-minify` --- ### 📝 Commits (1) - [`e148b0d`](https://github.com/actualbudget/actual/commit/e148b0d2565c03311f60a7fa6099ad342ef9963b) Enable compress without dropping debugger to avoid SyntaxError in safari 16 {to #1766} ### 📊 Changes **2 files changed** (+9 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/loot-core/webpack/webpack.browser.config.js` (+3 -1) ➕ `upcoming-release-notes/2825.md` (+6 -0) </details> ### 📄 Description Fixes #1766 The worker script `kcab.worker.$HASH.js` which minified by swcMinify includes functions like `function e(e,t=0){}`. Run this function in safari 16 will throw SyntaxError ![image](https://github.com/actualbudget/actual/assets/2139908/fd47c07c-6de0-4f3d-8263-27bb18aaa8db) Enable compress for swcMinify will remove useless function name `e` in `function e(e,t=0){}`. You can try compress flags in [this swc playground](https://play.swc.rs/?version=1.5.24&code=H4sIAAAAAAAAAytKTc8sLkkt0kgrzUsuyczPU0gpLcjJTE4sSY0HCWkguAWJRYm5Ogr5aWnFqSUKtgoGmgrVtZpcACgasG1CAAAA&config=H4sIAAAAAAAAA1WPSwrDMAxE9zmF0bqLttAueocewrhKcPAPS4GGkLvH33521sw8j7QNQsBMCh5iS880BBkJ42dOCq2O5TspgMpKUlEHhlN3Z8rWKA1hkfbqAMs4IReKrufLrRFgvCfsRNOsdnpcfzuVtyEi0X8wR6WbTOY5Lq1waKVg%2FWspXjuF14B1gTt8Q70rf1AUTc8O1jP2A%2BC7qlwWAQAA). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-02-28 20:57:14 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#4533