Results 1 to 4 of 4

Thread: Load remote js file, without including in the app,js compiled build

  1. #1
    Ext JS Premium Member
    Join Date
    Feb 2012
    Posts
    44
    Answers
    3

    Default Answered: Load remote js file, without including in the app,js compiled build

    Hello,

    I'm trying to understand how to deal with an external js (call it general.js) which contains some variables.

    So, the architect project has the general.js file appearing in the right bar under resources.

    I checked the flag "remote" and "requireSDK".

    So, here what's happening. Once i've created the build version, i can see inside the app.js file the variables i have defined in my external js file. I'm trying to understand why this happens, since the flag "remote" says that the file will not be compiled in.

    Moreover, once i load my app, i see an error. The app tries to download the external file (general.js) but it tells me that it cannot understand the command "Ext.define".

    This surprise me, since the flag "requireSDK" says that the script requires the SDK and will be compiled after.


    So, my question is. how can i load remotely my file without compile it in the app.js?



    Thanks in advance.
    Last edited by [email protected]; 6 May 2016 at 1:32 AM. Reason: typos

  2. I found out from the other thread that Sencha Cmd 6.1.1.76 cause the external JS/CSS not to be loaded. I was told to upgrade Sencha Cmd 6.1.2.15 which did resolved the problem.

    But it add another problem, now the internal web server could not run. This is a common problem when Sencha Architect and Sencha Cmd version mismatch.

    I had to published the app to an external web server to test.

  3. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    NZ
    Posts
    150
    Answers
    7

    Default

    There is another property you are missing known as "IncludeInBundle", you probably have that checked on your remote file. This flag will force contents of the remote file to be included in the App.js when compiled. Untick the option to keep the file separate from app.js.

  4. #3
    Sencha Premium Member
    Join Date
    Sep 2012
    Location
    Singapore
    Posts
    54
    Answers
    3

    Default

    I found out from the other thread that Sencha Cmd 6.1.1.76 cause the external JS/CSS not to be loaded. I was told to upgrade Sencha Cmd 6.1.2.15 which did resolved the problem.

    But it add another problem, now the internal web server could not run. This is a common problem when Sencha Architect and Sencha Cmd version mismatch.

    I had to published the app to an external web server to test.

  5. #4
    Ext JS Premium Member
    Join Date
    Feb 2012
    Posts
    44
    Answers
    3

    Default

    Thanks.
    i will try to update sencha cmd.

    indeed, the flag suggested is unchecked. i will let you know if the update will resolve my problem.

Similar Threads

  1. [OPEN] Wrong including remote JS
    By tnt9062 in forum Ext 5: Bugs
    Replies: 3
    Last Post: 19 Oct 2014, 8:54 AM
  2. Use separated .js file instead compiled .js
    By Victor23 in forum Ext: Q&A
    Replies: 4
    Last Post: 11 Feb 2014, 6:30 AM
  3. Including Remote Login Form
    By scorenfl in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 3 Dec 2013, 12:19 PM
  4. Replies: 2
    Last Post: 25 Aug 2011, 11:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •