Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]: webpack bundler added #252

Closed
wants to merge 2 commits into from

Conversation

viralgupta
Copy link
Contributor

Right now we are building binaries from raw javascript files given, this pr helps to reduce app size a bit by bundling js files.

i have tested with few apps and is working fine, @shalithasuranga could you also review this on your machine.

may-resolve #78

@viralgupta viralgupta marked this pull request as draft March 25, 2024 14:16
@viralgupta viralgupta marked this pull request as ready for review March 25, 2024 14:18
Copy link
Member

@shalithasuranga shalithasuranga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @viralgupta, thanks for sending this PR. Could you please compare the benefits of using https://www.npmjs.com/package/node-minify. Seems like it supports wildcard path matches, so we don't need to parse index.html manually. Thanks 🎉

@viralgupta viralgupta marked this pull request as draft May 31, 2024 03:56
Copy link
Contributor

@CosmoMyzrailGorynych CosmoMyzrailGorynych left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm against this and any PRs that arbitrarily mangle user's input. If I was a maintainer, I would veto it. If I was a user with that PR merged, I would simply not use Neutralino.js. Everyone uses their preferable build tools already and having the slowest and oldest possible packer mangle scripts is pointless, dangerous, and inflexible.

  • Bundling JS files just to minify them in one file is one of the least concerns when developing a desktop app.
  • ESM vs IIFE-type scripts are not handled here;
  • No way to configure path rewriting and external modules;
  • It's slow, there're dozens of popular options in the wild like vite, rollup, esbuild, etc.;
    • And the end user knows what to use better anyways.
  • And, really, Webpack? in 2024?!

@viralgupta
Copy link
Contributor Author

Hi @CosmoMyzrailGorynych,
Thank you for your feedback. I agree with all the points you've mentioned, and I had similar thoughts after creating this PR. That's why I drafted the PR, and I'm now closing it (I should have closed it earlier).

Please note: This was my first time contributing to open source, and I wanted to close issues quickly and genuinely wanted to help the community. However, I had little to no knowledge of the available bundling technologies when I created this PR. I apologize for any inconvenience caused.

@viralgupta viralgupta closed this Aug 19, 2024
@CosmoMyzrailGorynych
Copy link
Contributor

That's ok, I'm glad you're growing as a developer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bundle size is huge! Even larger than Electron?!
3 participants