Results 1 to 8 of 8

Thread: How to do production build but without compression/minimize?

  1. #1
    Sencha Premium User SebTardif's Avatar
    Join Date
    Feb 2011
    Location
    Cambridge, MA
    Posts
    1,294

    Default How to do production build but without compression/minimize?

    My app is having an issue only when doing production build, but the browser crash if I try to look-up the giant single line source code. How can I do a production build to get the same 'bug' but that I can actually debug the issue, so how to not minimize the code?

  2. #2
    Sencha Premium User SebTardif's Avatar
    Join Date
    Feb 2011
    Location
    Cambridge, MA
    Posts
    1,294

    Default

    Look like: 'sencha app build testing' is pretty much what I was looking for.

    After more tries, I end-up be able to do 'sencha app build production' but will work only if I comment out in app\.sencha\app\production.defaults.properties, that line:
    Code:
    #build.optimize=${build.optimize.enable}

  3. #3
    Sencha User dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,748

    Default

    I believe in Cmd 5.1.0 beta you can add this to app.json:

    Code:
        "production": {
            "compressor": null
        }
    To turn off optimization, this:

    Code:
        "output": {
            "js": {
                "optimize": false
            }
        }
    There will likely be more content in "output" that you'd want to keep.
    Don Griffin

    "Use the source, Luke!"

  4. #4

    Default

    Hello,

    Can you give update for ExtJs 6+ ?

    I tried this, but without success (compress doesn't occur and then at the end...)
    PHP Code:
    /**
     * Settings specific to production builds.
     */
    "production": {
        
    "compressor"null,
        
    "output": {
            
    "js": {
                
    "optimize"false
            
    },
            
    "appCache": {
                
    "enable"false,
                
    "path""../cache.appcache"
            
    }
        },
        
    "loader": {
            
    "cache""${build.timestamp}"
        
    },
        
    "cache": {
            
    "enable"false
        
    }

    I've tried several others configs but nothing works.

    For information I want my "production" file to be in one file but not in readable format.

    Thanks in advance

  5. #5

    Default

    Someone?

  6. #6
    Sencha Premium User vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    810

    Default

    Any updates on how we could do this on CMD 6.5 (Ext 6.5) GA ? I also had a few tries but without luck.
    Github https://github.com/vadimpopa
    Blogging @ : http://vadimpopa.com
    Twitter: @vadimvpopa

  7. #7
    Sencha Premium User
    Join Date
    Mar 2016
    Posts
    29

    Default

    Quote Originally Posted by vadimv View Post
    Any updates on how we could do this on CMD 6.5 (Ext 6.5) GA ? I also had a few tries but without luck.
    Same here. Using latest CMD (6.5.0.180) and can't get a 'human-readable' production build.

  8. #8
    Sencha Premium User
    Join Date
    Jun 2011
    Location
    Perth, Western Australia
    Posts
    182

    Default

    same here .. the suggested changes to app.json had no effect.

    I worked around this by using a .sh command file that builds: 'sencha app build testing' then copies the resulting app.js file to the folders where I need it. (in my case into the cordova platform folders)

    FWIW ...

    # COPY to BUILD . XML
    cp build-testing.xml build.xml // build-testing.xml is actually a "vanilla" build.xml
    cp app-testing.json app.json // and this .json has no mention of "Cordova" in it


    # SENCHA BUILD ...
    sencha app build modern testing

    # COPY app.js to required locations
    cp ../build/testing/MyProject/modern/app.js cordova/platforms/ios/www/modern
    cp ../build/testing/MyProject/modern/app.js cordova/www/modern

Tags for this Thread

Posting Permissions

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