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

Remove redundant __requireOverride #151

Merged
merged 1 commit into from
May 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions templates/vendor-platform.android.ts.template
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
// Resolve JavaScript classes that extend a Java class, and need to resolve
// their JavaScript module from a bundled script. For example:
// NativeScriptApplication, NativeScriptActivity, etc.
//
// This module gets bundled together with the rest of the app code and the
// `require` calls get resolved to the correct bundling import call.
//
// At runtime the module gets loaded *before* the rest of the app code, so code
// placed here needs to be careful about its dependencies.

require("application");
require("ui/frame");
require("ui/frame/activity");

if (global.TNS_WEBPACK) {
global.__requireOverride = function (name, dir) {
if (name === "./tns_modules/application/application.js") {
return require("application");
} else if (name === "./tns_modules/ui/frame/frame.js") {
return require("ui/frame");
} else if (name === "./tns_modules/ui/frame/activity.js") {
return require("ui/frame/activity");
}
};
}