-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
How do I get --target=electron
to play nice with yarn workspaces?
#1571
Comments
Maybe one solution is to follow symlinks for the require and check wether it is located within node_modules or not? |
I found #1101 by @devongovett which seems like it should have solved this. Although I added |
Any updates on this? |
Suffering from the same problem with |
yes, i don't think that this is an electron specific problem, i'm facing the same problem bundling my react application. @devongovett are parcel/symlinks+source compatible with yarn workspaces? (I couldn't find any other issue on it yet it doesn't seem to be fully working) [edit] to be more specific, there seems to be two issues:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. |
❔ Question
How do I get
--target=electron
to play nice with yarn workspaces?🔦 Context
I'm using yarn workspaces (https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/) to organise my code in different packages within the same repo. However do to this basically just symlinking directories into
node_modules
it seems to break some assumptions in Parcel when bundling for electron.Imagine I have this structure:
Yarn workspaces will map that directly into
node_modules
like so, not thatnode_modules
now has typescript files in it:The problem with this is that parcel (when run with
--target=electron
) will skip bundling any node_module dependencies and defer this to runtimerequire()
call. However runtimerequire()
will fail because it will try to require a typescript file which has not been bundled.Everything works as expected with
--target-browser
. Can I somehow give parcel a list of packages to always bundle? Or can we perhaps get parcel to automatically look atworkspaces
inpackage.json
to figure out which modules need to be bundled fromnode_modules
?The text was updated successfully, but these errors were encountered: