Repository navigation
Patch mono-repo support by manually copying any externals that havent been already copied - #11
Open
FrozenKiwi wants to merge 2 commits into
Open
FrozenKiwi wants to merge 2 commits into
FrozenKiwi wants to merge 2 commits into
Conversation
FrozenKiwi
commented
Jan 18, 2024
| .forEach((name) => foundModules.add(name)); | ||
| .forEach((dep) => { | ||
| // How many occurences of `node_modules` in the path | ||
| const levels = dep.path.split(`${sep}node_modules${sep}`).length - 1; |
Author
There was a problem hiding this comment.
while a little naive, finding nested modules by splitting on node_modules err's on the side of copying too much (less bad than not enough)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added support for (my) monorepo setup.
All packages (to the extent possible) hoisted to the root.
When packaging, electron-forge copies
<root>/app/my-electron-appto it's temp folder, but it does not copy anything from<root>/node_modulesThe plugins original code did not explicitly copy modules across, and simply prevented them from being ignored. This means any
externalmodules that have been hoisted are not present in the final build.This PR adds an explicit copy in the
afterCopyhook to copy across any packages that have not been copied by electron-forgeTested: