mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
perf(electron): speed up Windows packaging with ASAR (#1190)
* perf(electron): package Windows app with ASAR * fix(electron): use portable ASAR unpack glob * fix(electron): unpack native modules from ASAR
This commit is contained in:
+13
-4
@@ -11,10 +11,12 @@ const config = {
|
||||
appBundleId: '5chan.desktop',
|
||||
icon: './public/icon', // electron-forge adds the correct extension per platform
|
||||
|
||||
// NOTE: asar is disabled because of a bug where electron-packager silently fails
|
||||
// during asar creation with 5chan's large node_modules. The app works fine without it.
|
||||
// TODO: investigate and fix the asar creation issue
|
||||
asar: false,
|
||||
// Keep Squirrel from processing the deeply nested dependency tree as loose files.
|
||||
// Kubo and native modules still need real filesystem paths at runtime.
|
||||
asar: {
|
||||
// Use forward slashes so minimatch also recognizes the glob on Windows.
|
||||
unpackDir: 'bin/**/*',
|
||||
},
|
||||
|
||||
// Exclude unnecessary files from the package
|
||||
ignore: [
|
||||
@@ -81,6 +83,13 @@ const config = {
|
||||
},
|
||||
},
|
||||
|
||||
plugins: [
|
||||
{
|
||||
name: '@electron-forge/plugin-auto-unpack-natives',
|
||||
config: {},
|
||||
},
|
||||
],
|
||||
|
||||
makers: [
|
||||
// macOS
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user