You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Andrew Grieve (JIRA)" <ji...@apache.org> on 2014/01/08 15:59:52 UTC
[jira] [Resolved] (CB-5575) cordova.js localRequire bug
[ https://issues.apache.org/jira/browse/CB-5575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Grieve resolved CB-5575.
-------------------------------
Resolution: Won't Fix
Assignee: Andrew Grieve
I think the local require syntax is meant to be used only with .js files included using <js-module> within a plugin.xml. In this case, the module ID looks like:
the.plugin.id.JsModuleName
So that's why it's looking for dot instead of slashes.
> cordova.js localRequire bug
> ---------------------------
>
> Key: CB-5575
> URL: https://issues.apache.org/jira/browse/CB-5575
> Project: Apache Cordova
> Issue Type: Bug
> Components: CordovaJS
> Affects Versions: 3.2.0
> Reporter: danny
> Assignee: Andrew Grieve
> Original Estimate: 612h
> Remaining Estimate: 612h
>
> if (id.charAt(0) === ".") {
> resultantId = module.id.slice(0, module.id.lastIndexOf(SEPERATOR)) + SEPERATOR + id.slice(2);
> }
> if module.id like "test/123", use localRequire when id like "./test", resultantid will "test/12.test", right?
>
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)