You found a bug! We've classified it as SDKTOOLS-519 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Jun 2013
    Posts
    6
    Vote Rating
    0
    MWuellenweber is on a distinguished road

      0  

    Default Concatenated all-classes.js still tries to load scripts dynamically.

    Concatenated all-classes.js still tries to load scripts dynamically.


    REQUIRED INFORMATION


    Sencha Cmd version(s) tested:
    • Sencha Cmd 3.1.2.342
    Operating System:
    • ________
    • Win8 Pro
    Framework used:
    • Ext JS 4.2.1
    Description:
    • After migrating from 4.1x to 4.2 I cannot build my app any more. The concatenated all-classes.js still tries to load classes dynamically. I have isolated the problem in a tiny app.
    Steps to reproduce the problem:


    Code:
    j:\cb\js\apps\problems>sencha compile -classpath=/cb/js/common/extjs/src page -in /cb/js/apps/problems/problems.htm -out /cb/js/Apps/problems/index.html >> log.txt

    Code:
    Sencha Cmd v3.1.2.342
    [INF] Compiling page null
    [INF] Loading classpath entry J:\cb\JS\Common\ExtJS\src
    [INF] Loading classpath entry J:\cb\JS\Apps\Problems\js
    [INF] Loading classpath entry J:\cb\JS\Apps\Problems\sencha-compile-temp-dir\d132551d-8f1f-4cbb-817a-da18b38679a1
    [INF] Concatenating output to file J:\cb\js\Apps\problems\all-classes.js



    The single page html:
    Code:
    <!DOCTYPE html>  
    <html>
    <head>
    <meta charset="utf-8" />
        <link rel="stylesheet" type="text/css" href="../../Common/extjs/resources/css/ext-all.css" />
        <!-- <x-compile> -->
        <!-- <x-bootstrap> -->
        <script src="../../Common/extjs/ext-dev.js"></script>
        <!-- </x-bootstrap> -->
        <script src="Problems.js"></script>
        <!-- </x-compile> -->
    
    
    <title>Ext JS Build/Load Problems</title>
    
    
    </head>
        <body>
            Problem with Sencha Cmd: Does not include the required Ext classes into all-classes.js but tries to load them dynamically.
        </body>
    </html>

    Minimal JS:
    Code:
    Ext.require( [
        'Ext.form.field.Text'
    ] );
    
    
    
    
    Ext.Loader.setConfig( {
        enabled: true,
        path: {
            'Ext': '/cb/js/Common/ExtJS'
        }
    } );
    
    
    Ext.onReady( function () {
    //    var textDummy = Ext.create( "Ext.form.field.Text", {} );
        alert( "Alert never reached in compiled version." );
    } );

    The result that was expected:
    • Running problems.html is fine
    • The generated all-classes.js should be self-sufficient
    The result that occurs instead:
    • The app fails with JavaScript runtime error: [Ext.Loader] Failed loading 'http://localhost:57189/JS/Apps/Problems/src/form/field/Text.js'

    I understand that the problem is probably trivial, still I cannot resolve it on my own and it worked fine with ExtJS 4.1x.


    Thanks!

  2. #2
    Sencha User
    Join Date
    Oct 2012
    Posts
    20
    Vote Rating
    2
    mike.arps is on a distinguished road

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha Premium Member varsos's Avatar
    Join Date
    Feb 2008
    Location
    Long Island, NY
    Posts
    342
    Vote Rating
    16
    varsos will become famous soon enough

      0  

    Default


    I discovered the same issue but it did not cross my mind that it could be a defect.
    I had to device a way to detect production mode and turn the Loader's enabled property to false, which worked.
    varsos

Thread Participants: 2