在ExtJs 4.2中,我总是在开发环境中使用ext-debug.js
。与ext-all-debug.js
相比,优势在于每个类都作为单独的文件加载,因此开发人员工具中的回溯更加清晰。如何在ExtJs 5.0中使用ext-debug.js?
我做了升级,从4.2 ExtJS的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"
煎茶建立与此failes错误
[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
给出了一些警告,最终无法构建应用程序。
包含在应用程序中的文档。json说**框架**应该是'ext'或'sencha'。另一方面**类路径**告诉加载器应该在哪里查找应用程序的类。在我的情况下,它是''classpath“:”$ {app.dir}/app“'。添加'$ {framework.dir}'或'$ {app.dir}/ext'对我来说没有意义,是不是?我会试一试,但我很怀疑。 – 2015-04-06 12:21:00
我尝试了你的建议,但是我无法让它工作。请参阅编辑。也许你可以提供一些更具体的建议? – 2015-04-06 13:12:05
刷新/编译应用程序后,您能向我们展示bootstrap.json的输出吗?在你的基础软件包目录没有正确设置的地方,很难说没有看到你的一些配置文件。 – OhmzTech 2015-04-06 15:28:59