Ext.ux app build vs app watch (ExtJS 6.2.0 GPL)

你。 提交于 2019-12-11 16:23:59

问题


I have a problem I cannot solve regardless of books and google - but I assume is stupidly simple to answer for someone more skilled than me :-)

Using CMD 6.5.2 and ExtJS 6.2.0 GPL

I am trying to build a desktop application, using the sample desktop as a starting point.

I can get my desktop up and running fine, modify it, show my data - as long as I use "sencha app watch classic".

I have put "ux" in the requires list in app.json, and also using extend: 'Ext.ux.desktop.App' in Application.js

So running "sencha app watch classic" shows me my desktop, but running "sencha app build classic production", and then moving the files in build/production/Desktop/ to my web server does not work at all.

I get an error like this in Chrome console: GET http://localhost/desktop/.js 404 (Not Found) (index) : 72

So the script is trying to load a js-file with an empty name, this is quite hard to explore for me, a more verbose error would have been nice :-)

Anyone have a clue as to what is going on?!

//Jonas


回答1:


When you open your uncompiled version of the application in a browser (through a local web server), you may see one or more of the following warnings in the browser console:

[W] [Ext.Loader] Synchronously loading 'MyApp.view.Test'; consider adding Ext.require('MyApp.view.Test') above Ext.onReady

This means that you reference MyApp.view.Test somewhere, but the app does not know it is required, and thus does not load it beforehand - nor compiles it into the built version.




回答2:


You are missing some "requires" of extjs classes. You can find them by running the application built with testing env, you should see in the console some usefull warnings about classes you missed to require.



来源:https://stackoverflow.com/questions/47209684/ext-ux-app-build-vs-app-watch-extjs-6-2-0-gpl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!