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: handle externals all-monorepo option #280

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

maximang
Copy link

@maximang maximang commented Jan 7, 2022

No description provided.

@jayair jayair added the enhancement New feature or request label Jan 17, 2022
@jayair
Copy link
Member

jayair commented Jan 17, 2022

Thanks for the PR!

I'm wondering, can we do this by default for the all option? Would it error out if we traversed up the directories and looked for a root package.json.

@maximang
Copy link
Author

Sorry for the late answer, I was in holiday.

I tried using nodeExternals({ additionalModuleDirs: [path.resolve(process.cwd(), "../../node_modules")] }) on a non-monorepo project. I put the project at the top-level directory to be sure it would also work if ../../ doesn't exist. I tested it on Linux and Windows, it worked in both cases.

I will update the PR.

@jayair
Copy link
Member

jayair commented Feb 14, 2022

Thanks! We have a test case for the externals that's failing. If we can fix that, I can merge it.

@maximang
Copy link
Author

Test fixed

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

Successfully merging this pull request may close these issues.

3 participants