Skip to content

feat(plugin-webpack): Package all webpack externals and their dependencies - #2345

Closed
timfish wants to merge 1 commit into
electron:mainfrom
timfish:feat/package-externals
Closed

timfish wants to merge 1 commit into
electron:mainfrom
timfish:feat/package-externals

Conversation

@timfish

@timfish timfish commented Jun 28, 2021

Copy link
Copy Markdown
Contributor
  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

This brings the functionality of this plugin and enables it by default.

  • Collects Webpack externals from both main and renderer configs
  • Finds all their dependencies using flora-colossus
  • Ensures the correct directories in node_modules get included in the packaged app

This makes it particularly easy to get native modules working if they don't work well with Webpack. You just add them to Webpack externals and everything should work.

Notes:

  • This doesn't work with monorepos with hoisted modules
  • It currently uses private fields and methods of flora-colossus
  • Not yet tested in combination with Vercel loader

@augustnmonteiro

Copy link
Copy Markdown

@timfish, thank you so much for it, do you know when will this get merged?

@timfish

timfish commented Feb 10, 2022

Copy link
Copy Markdown
Contributor Author

This PR is not finished and I haven't got time to finish at the moment.

Anyone else is welcome to take the reins though!

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.

3 participants