Skip to content

Commit d09028a

Browse files
authored
Update index.js
Also fix up paths of internal import.
1 parent 2ef3249 commit d09028a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/webpack/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ class NativeScriptHTTPPlugin {
3030
if (resourceRegExp.test(result.request)) {
3131
// Replace the relative http-request import from core http.
3232
if (this.replaceHTTP && result.request === "./http-request") {
33-
if (result.context.endsWith("@nativescript/core/http")) {
33+
if (replacePathDelimiter(result.context).endsWith("@nativescript/core/http")) {
3434
result.request = "../../../@klippa/nativescript-http";
3535
}
36-
if (result.context.endsWith("tns-core-modules/http")) {
36+
if (replacePathDelimiter(result.context).endsWith("tns-core-modules/http")) {
3737
result.request = "../../@klippa/nativescript-http";
3838
}
3939
}

0 commit comments

Comments
 (0)