Results 1 to 8 of 8

Thread: $jscomp object added to "other" javascript files - SenchaCMD 6.5

  1. #1

    Default $jscomp object added to "other" javascript files - SenchaCMD 6.5

    I am using CKEDITOR and Ace in the application. I defined them in app.json in settings specific to production builds.

    Code:
    "production": {  "output": {
        "appCache": {
          "enable": true,
          "path": "../cache.appcache"
    }
      },
      "loader": {
        "cache": "${build.timestamp}"
    },
      "cache": {
        "enable": true
    },
      "classic": {
        "js": [
          {
            "path": "resources/ckeditor-4.5.11/ckeditor.js",
            "bundle": false
    },
          {
            "path": "resources/aceeditor/ace.js",
            "bundle": false
    }
        ]
      }
    }
    Since I upgraded to SenchaCmd 6.5 $jscomp object gets added to these files when creating production builds and it breaks Ace and CKEDITOR.


    screenshot_1.png

    screenshot_2.png

    Is there a reason, that $jscomp gets added to these files? Can I do anything to prevent $jscomp from being added to "other" javascript files.

    EDIT:

    $jscomp gets added even if I specify version in the js array.

    Code:
    "js": [
      {
        "path": "resources/ckeditor-4.5.11/ckeditor.js",
        "version": "ES6",
        "bundle": false
    }
    Last edited by onestep; 23 May 2017 at 12:22 AM. Reason: new information

  2. #2
    Sencha Premium Member richardvd's Avatar
    Join Date
    Jun 2011
    Location
    NL
    Posts
    255

    Default

    It may be related to this bug report: https://www.sencha.com/forum/showthr...mp-global-leak

  3. #3
    Sencha User
    Join Date
    Oct 2009
    Location
    Tehran
    Posts
    31

    Default

    Change app.json to ::

    Code:
    "output": {
          "base": "${workspace.build.dir}/${build.environment}/${app.name}",
          "page": "index.html",
          "manifest": "${build.id}.json",
          "js": {
            "path": "${build.id}/app.js",
            "version": "ES6"
          },
          "appCache": {
            "enable": false
          },
          "resources": {
            "path": "${build.id}/resources",
            "shared": "resources"
          }
        },
    Telegram Channel : https://t.me/extjs

  4. #4

    Default

    This actually worked, and it removed $jscomp from all JS files.

    But this version of CMD still does something with ckeditor.js and ace.js, because now I'm getting a new error.

    screenshot_3.png

  5. #5
    Sencha Premium Member
    Join Date
    Sep 2014
    Posts
    43

    Default

    Having a look at the files in the production build directory it seems the are being minified again. Or at least attempting to minify them again as it seems to be mangling the files instead!

  6. #6
    Touch Premium Member
    Join Date
    Aug 2010
    Posts
    2

    Default

    CMD seems to minify all the js files and prepending $jscomp. Setting "remote": true fixed the issue and js files are no longer altered during the build.
    Code:
    "js": [
        {
            "path": "path/external-lib.js",
            "remote": true
        }
    ]

  7. #7
    Sencha Premium User v1r's Avatar
    Join Date
    Feb 2013
    Location
    Canada
    Posts
    35

    Default

    This a problem related to the compression applied on files.

    Disabling the compression can fix the problem, but not sure if it is a good idea though.

    .sencha/production.properties:
    enable.resource.compression=false


    Update:

    I you dont want your external minified JS files located in resources to be compressed, add remote: true for each path in the app.json.

    Hope it helps!
    ---
    Karim Besbes
    'Softineer' at Ubisoft Montreal

  8. #8
    Sencha User
    Join Date
    Jan 2016
    Location
    Brazil
    Posts
    138

    Default

    I noticed the extjs commercial package for 6.5.1 comes with build/ext-all-debug.js compressed like that. I'm not very sure how to disable this compression just to the -debug javascript files. I believe that shouldn't be that by default should it? The compressed files are pretty much "not debuggable" like that.
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

Similar Threads

  1. Dealing with "other" JavaScript Files
    By jhoweaa in forum Sencha Cmd
    Replies: 1
    Last Post: 13 Oct 2014, 4:47 AM
  2. Replies: 10
    Last Post: 16 Dec 2012, 4:16 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
  •