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

Conversation

vchimev
Copy link
Contributor

@vchimev vchimev commented Jan 28, 2019

Use this.rootContext instead of this.context.
For example this second-page module:

---> this.resourcePath is /Users/vchimev/git/nativescript-dev-webpack/demo/TypeScriptApp/app/views/second-page.xml
---> this.context is /Users/vchimev/git/nativescript-dev-webpack/demo/TypeScriptApp/app/views
---> this.rootContext is /Users/vchimev/git/nativescript-dev-webpack/demo/TypeScriptApp/app
---> modulePath should be ./views/second-page.xml

PR Checklist

What is the current behavior?

For example, this second-page module resolves modulePath to ./second-page.xml.

What is the new behavior?

From the above example,modulePath should be ./views/second-page.xml.

Use `this.rootContext` instead of `this.context`.
For example in this [second-page](https://github.com/NativeScript/nativescript-dev-webpack/blob/master/demo/TypeScriptApp/app/views/second-page.xml) module:

---> `this.resourcePath` is /Users/vchimev/git/nativescript-dev-webpack/demo/TypeScriptApp/app/views/second-page.xml
---> `this.context` is /Users/vchimev/git/nativescript-dev-webpack/demo/TypeScriptApp/app/views
---> `this.rootContext` is /Users/vchimev/git/nativescript-dev-webpack/demo/TypeScriptApp/app
---> `modulePath` should be ./views/second-page.xml
@vchimev vchimev requested review from vakrilov and sis0k0 January 28, 2019 21:09
@vchimev vchimev merged commit a83380a into master Jan 31, 2019
@vchimev vchimev deleted the vchimev/fix-hot-load branch January 31, 2019 15:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants