Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

fix: handle relative requests from inside an external module #918

Closed
wants to merge 1 commit into from

Conversation

DimitarTachev
Copy link
Contributor

PR Checklist

What is the current behavior?

The Webpack externals logic is matching only the request (the string inside a require or import call), while we need to match both the request and the context when matching relative requests from inside an external module.

What is the new behavior?

We provide a custom externals handler in order to join the context and the request in such cases.

Related to: NativeScript/nativescript-cli#4658

@cla-bot cla-bot bot added the cla: yes label May 31, 2019
}

if (externalRegexps.some(regExp => regExp.test(nonRelativeRequest))) {
return callback(null, 'commonjs ' + request);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check if here you shouldn't use nonRelativeRequest.

@DimitarTachev DimitarTachev deleted the tachev/fix-externals branch July 10, 2019 11:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants