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

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

timfish
Copy link
Contributor

@timfish timfish commented Jun 28, 2021

  • 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

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

@timfish
Copy link
Contributor Author

timfish commented Feb 10, 2022

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.

None yet

2 participants