Skip to content

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