【发布时间】:2015-04-02 15:12:47
【问题描述】:
在 ExtJs 4.2 中,我在开发环境中一直使用ext-debug.js。与ext-all-debug.js 相比的优势在于,每个类都作为单独的文件加载,因此开发人员工具中的回溯更加清晰。
我从 ExtJs 4.2 升级到 5.1,我的 app.json 看起来像:
/**
* Comma-separated string with the paths of directories or files to search. Any classes
* declared in these locations will be available in your class "requires" or in calls
* to "Ext.require". The "app.dir" variable below is expanded to the path where the
* application resides (the same folder in which this file is located).
*/
"classpath": "${app.dir}/app",
/**
* The Sencha Framework for this application: "ext" or "touch".
*/
"framework": "ext",
"js": [
{
"path": "${framework.dir}/build/ext-all-rtl-debug.js"
},
{
"path": "app.js",
"bundle": true
}
],
当我将行改为
"path": "${framework.dir}/build/ext-debug.js"
-
sencha 构建失败并出现此错误
[INF] Capturing theme image [ERR] loading page W%3A/mbgest25dev/sass/example/theme.html registering ready listener... [E] [Ext.Loader] Some requested files failed to load. ... dozens of times the same error ext-debug.js已加载,但所有类都加载了错误的 URL(并出现 404 错误)GET http://example.com/packages/sencha-core/src/class/Mixin.js?_dc=1427986581354而不是GET http://example.com/app-directory/ext/packages/sencha-core/src/class/Mixin.js?_dc=1427986581354
当然,sencha app build 中的错误与浏览器中的错误相同。
必须有一个缺失的配置告诉ext-debug.js 在哪里寻找框架,而ext-all-rtl-debug.js 不需要知道。
如何配置 ExtJs 5.0 以使用 ext-debug.js 以便能够从更清晰和更相关的堆栈跟踪中受益?
编辑:
将 ext 框架类的路径添加到 classpath(如 "classpath": "${app.dir}/app,${app.dir}/ext",)并没有帮助。 sencha cmd 给出了一些警告,最终构建应用程序失败。
【问题讨论】: