Skip to Content

Accelerate your UI5 application with component-preload minified


After working on a project where the connectivity of the pc was not desirable, we came to the conclusion that we needed something more than the component-preload to minimize the load of the application.

In this sense, we decided to minimize the size of the code to load, we conclude that we should generate files with GULP through the minification.

You can generate the component-preloadjs file by following these steps:

We added here the steps that we can find also in the github wiki:


  1. Install the last version of node.js node.js
  2. Download files package.json and gulpfile.js Master branch
  3. Copy this files into your project into WebContent folder

Step 3

  1. Configure eclipse to discard node packages when sumbit files to SAP Gateway in “Windows” > “References” > “Team” > “Ignored Resources” and add “node_modules”

Step 4

  1. Install gulp dependencies with package.json

Step 5

  1. Prepare gulpfile.js for your project. You need to change name of project in gulpfile with your name of project in index.html:

Step 5

After these stepts you will have a new folder called node_modules, so, the project are ready to generate component-preload.js.

2. Generate Component preload.js

To generate component-preload.js file with task minify js, you only have to execute the task of gulp with the right button of your mouse.

Generate with: "Run As" > "Gulp Task"

A few seconds later we have our file 🙂



And we already have our application minimized 😉


For more information *

Step 3
Step 4
Step 5
Step 5
Generate with: "Gulp Task""/>
You must be Logged on to comment or reply to a post.
  • Hello Enric Castella Gonzalez
    I got error when running step 5 - Install gulp dependencies with package.json

    17447 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
    17448 error node v6.9.3
    17449 error npm v3.10.10
    17450 error code ENOGIT
    17451 error not found: git
    17452 error Failed using git.
    17452 error This is most likely not a problem with npm itself.
    17452 error Please check if you have git installed and in your PATH.
    17453 verbose exit [ 1, true ]

    Does this mean I have to install GIT?

    Thank you.


    • If you use Windows is not necessary install git. But some times you need to configure git path.

      Please check the solution mentioned in the follow post:


      Best regards

  • Hi Enric,

    are you aware of the SAP supported build using Grunt?

    Best regards