Page 3 of 3 FirstFirst 123
Results 21 to 22 of 22

Thread: How to include my own javascript files

  1. #21
    Sencha User semiaddict's Avatar
    Join Date
    Mar 2010
    Posts
    45
    Vote Rating
    2
      0  
    ---
    Oussama Mubarak // Semiaddict

  2. #22
    Sencha User
    Join Date
    Nov 2015
    Posts
    5
    Vote Rating
    -1
      -1  

    Default

    EDIT (version 2)
    It works for me with Sencha Cmd 6.1.3.42 and ExtJS 6.0.1, but only if the js file is in the app folder. In a subfolder, it does not work, __unless__ you add
    PHP Code:
    "includeInBundle"true 
    TL;DR in app.json:

    PHP Code:
        "js": [
            {
                
    "path""app.js",
                
    "bundle"true
            
    },
            {
                
    "path""someesternalsource.js"  // it works
            
    },
            {
                
    "path""somesubfolder/someesternalsource.js"  // it does NOT work
            
    },
            {
                
    "path""somesubfolder/someesternalsource.js",
                
    "includeInBundle"true  // it DOES work
            
    }
        ], 
    From the documentation:
    When you add extra files, there are some optional properties that indicate how the build process will treat them. For example, in the above case, "library.js" will be included in the concatenated build output and removed from the runtime manifest.
    If instead you removed "includeInBundle", then "library.js" would be assumed to reside in your app folder and would then be copied to the build output folder. The entry would remain in the manifest and be loaded separately by the Microloader.

Page 3 of 3 FirstFirst 123

Posting Permissions

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