Results 1 to 2 of 2

Thread: Combining all ext classes in one file and required classes.

  1. #1
    Sencha Premium Member
    Join Date
    Apr 2014
    Posts
    39
    Answers
    1

    Default Combining all ext classes in one file and required classes.

    We are almost ready to start deploying our application and I'm looking around on how to execute the minification process. At first I tried to minify each file separately but the gradle plugin I'm using doesn't support this feature and I had to go with minifying and combining all the files into one. I was able to make my application work but whenever I load a class that has a 'requires' array it tries to find the required folder in the source path and fails. The application works normally because the full length of the code is loaded in advance in the 'all.js' file but on the console it gives me like 30 errors on missing files that it attempts to load from the requires array.

    My question is, what is the best process to follow when packaging an application? Mind you we're using ExtJS in a really weird way. There is no Sencha CMD, no architect etc. We simply have `ext-all.js` included and we write javascript code in our IDE. This is why we need a solution that allows us to simply minify the code using an outside tool and not something like sencha cmd.

    Exmaple of the problem:

    A class has:
    Code:
    requires: ['MyApplication.actions.ActionHandlers']
    and it tries to find the file in
    Code:
    %APPLICATION_PATH%/actions/ActionHandlers.js
    which doesn't exist because everything is combined inside
    Code:
    all.js
    which is loaded through a
    HTML Code:
    <script>
    tag.

  2. #2
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,579
    Answers
    165

    Default

    Since you're not using Cmd for this, and if you're ensuring that all classes are compiled into a single file, you can get rid of the requires config.
    Tristan Lee
    Sencha Inc - Sustaining Engineer


    Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (fiddle.sencha.com)

    Embed your fiddle in your post: [FIDDLE]id[/FIDDLE]

Similar Threads

  1. upggrading to 4.0.0 beta: build with only required classes
    By christophe.geiser in forum Sencha Cmd
    Replies: 2
    Last Post: 8 Sep 2013, 11:30 PM
  2. Include only required classes in ext-all.js
    By zzhouag in forum Ext: Q&A
    Replies: 8
    Last Post: 13 Aug 2013, 9:07 PM
  3. [CLOSED] Build js file with only the required classes
    By steenole in forum Sencha Cmd
    Replies: 23
    Last Post: 22 Apr 2013, 10:34 PM
  4. Missing required classes sencha SDK production
    By geniodella in forum Ext: Q&A
    Replies: 1
    Last Post: 14 Apr 2013, 2:44 PM

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
  •