From 112d38c8eb7999f2b12406aa534844d656f91cd4 Mon Sep 17 00:00:00 2001 From: Vladimir Y Date: Thu, 5 Nov 2020 03:32:33 +0300 Subject: [PATCH] fix "freebsd" package assembling * broken recently in f6d34ca5a8ad5571462d462c0bcb57e7a79dd47d due to the "asar: false" causing long file names preserving: .cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64/lib/app/lib/fpm/util/tar_writer.rb:51:in `split_name': File "/opt/ElectronMail/resources/app/app/web/browser-window/vendors-node_modules_angular_cdk___ivy_ngcc___bundles_cdk-drag-drop_umd_js-node_modules_ngx-c-0c59fc.js" has a too long name (should be 100 or less) (Gem::Package::TooLongFileName) --- webpack-configs/web/browser-window.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/webpack-configs/web/browser-window.ts b/webpack-configs/web/browser-window.ts index c58ce84d3..5f9116a3b 100644 --- a/webpack-configs/web/browser-window.ts +++ b/webpack-configs/web/browser-window.ts @@ -115,6 +115,17 @@ const config = buildBaseWebConfig( optimization: { splitChunks: { cacheGroups: { + defaultVendors: false, + vendors: { + test: /[\\/]node_modules[\\/]/, + priority: -10, + filename({chunk}) { + if (!chunk?.hash) { + throw new Error(`Invalid "chunk.hash" value`); + } + return `vendor_${chunk.hash}.js`; + }, + }, styles: { name: "shared-vendor", test: /[\\/]vendor[\\/]shared-vendor\.scss$/,