Comments (12)
We should not assume end users will ever have node installed. The main use case I have for this kind of front-end interface is to get non-developers started with a ready-to-use single purpose GUI.
If there are things being bundled that are not used at all, of course it could be trimmed down to just what is required to run, but the bundle should be self contained and ready to roll without further downloading.
from desktop.
As @alerque said, the app should work in non-developer's environment. Just download and extract it.
If I could, of course I want to shrink its bundled size. However I'm not good at this topic. Would you tell me whether there is any way?
from desktop.
Yeah, removing them entirely is probably a bad idea, but most deps in node_modules
don't need all the files they come with for your code to work (you don't need the tests and docs and all that if you're using them as actual code dependencies in a deployed project).
I would recommend using something like webpack, which despite having "web" in the name also comes with the ability to bundle "for node", so you can point it at the entry file for your application, and it'll generate a full bundle that acts as a node library that you can then write a trivial one-line application.js
file with content require('./bundle')
for, and then run as node application.js
. Make webpack minify the bundle, and things get really nice.
from desktop.
Thanks, I'll check.
from desktop.
I tried webpack at 174988a.
Most of app's size is occupied by Electron itself. So the size won't be reduced by webpack.
However, the number of files decreases much. This is effective when extracting the archive.
from desktop.
interesting finding, how little of a difference does it make in terms of size?
from desktop.
On Windows 64bit:
version | zip | extracted | files | folders | resources/app |
---|---|---|---|---|---|
v1.0.3 | 52.6MB | 133MB | 3476 | 270 | 12.2MB |
174988a | 48.8MB | 125MB | 105 | 13 | 4.06MB |
from desktop.
interesting. Yeah that's not too much space saved (although 4mb on 52/48 is still considerable), but that's an amazing reduction in files. Out of curiosity, which zipper did you use? If the resources/app
set went down by over 8mb, I'd imagine something like 7z should be able to reflect that in the packed size, too
from desktop.
v1.0.4 is released. It uses webpack.
from desktop.
you are a hero
from desktop.
btw, perhaps interesting to know, using 7z rather than plain zip for compression gives me a 31MB archive for 1.0.4 (set to best compression, since it's a release pack), rather than 51MB, so that's a drastic savings, too. Might be worth using 7z for future releases.
from desktop.
I know 7z can compress better than zip, however, it's not supported by os. So I will use only plain zip. Thanks.
from desktop.
Related Issues (20)
- [Bug]: README for linux is outdated OR Desktop launcher isn't created HOT 7
- [Bug]: Notifications in notification center do not disappear after they have been read HOT 6
- [Bug]: Unable to upload attachments HOT 3
- [Bug]: No notification given for update HOT 2
- [Bug]: Permission for audio not allowed HOT 26
- [Bug]: Repeating messages after mattermost-desktop closing and tray closing in Windows 11
- Crash during upgrade of Mattermost to version 5.5.1 (signature issue) HOT 2
- [Bug]: "Add Server" dialogue cannot be used to add server HOT 5
- [Bug]: Desktop app hangs after user login through simulated Gitlab SSO. HOT 15
- [Crash]: GPU process exited unexpectedly: exit_code=134 HOT 3
- Unable to authenticate Desktop App through gitlab OAUTH2 Login since 9.1.x HOT 29
- [Bug]: AutoFill is not offered during MacOS logins HOT 2
- [Bug]: Alternative HTTPS Port does not stick on desktop app. Reverts to HTTPS 443 HOT 3
- [Bug]: Mattermost Desktop v5.6.0-rc.1 msi package does not install correctly. Exe setup works fine HOT 1
- [Bug]: cannot login HOT 2
- [Bug]: Deeplinks do not work on linux or mac HOT 16
- [Bug]: Cannot update Mattermost, Mattermost cannot be closed try again HOT 2
- [Bug]: notification not supported HOT 12
- Issue Adding Self-Hosted Mattermost Server to Mattermost Desktop Client HOT 4
- [Bug]: MimeType missing in Desktop Entry File on generic linux HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from desktop.