cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Component-Preload File Problem

Former Member
0 Likes
5,989

Hi,

I am currently trying to improve the performance of my app by loading a Component-preload file. I am following a similar method as in this post

When I started working on my app, I removed the "cannot load Component-preload file" error by inserting the data-sap-ui-preload="" line in my index.html file. The problem that I am facing now is that I cannot get back to the state where it complains about not finding the preload file. I removed the data-sap-ui-preload="" line from my index file, yet the GET request for the preload file is still missing. While inspecting my network tab in chrome, I can see that it does load library-preload files, but the component-preload GET request is nowhere to be found.

Is there something else that I forgot about to enable the loading of a component-preload file? Just to clarify, Generating a Component-preload file is not my current problem, the problem is I want my app to complain about the missing preload file again. I know this seems weird, but once it complains, I can give it my preload file and take it from there.

I am running SAPUI5 v1.28

Regards

Albert Volschenk

View Entire Topic
Former Member
0 Likes

Just to give some idea of what my code looks like:

in my index.html I have:


<head>    

     <script id="sap-ui-bootstrap"

          src="resources/sap-ui-core.js"

          data-sap-ui-libs="sap.m, sap.ui.unified"

          data-sap-ui-theme="sap_bluecrystal"

          data-sap-ui-xx-bindingSyntax="complex"

          data-sap-ui-resourceroots='{"myNamespace":"./"}'

          data-sap-ui-preload="sync">

In chrome I get the follwing:

I created a test project a while back, and it seems to be working correctly there. The bootstrap:


<script id="sap-ui-bootstrap"

     src="resources/sap-ui-core.js"

     data-sap-ui-libs="sap.m"

     data-sap-ui-xx-bindingSyntax="complex"

     data-sap-ui-resourceroots='{"myNamespace": "./"}'>

it gives the following output:

So I know I can generate and load a correct Component-preload file, its just in my main project it doesn't even try to load it.

I can't seem to find the difference between the project's bootloaders (removing the preload="sync" in my main project doesn't do anything), please let me know if I should supply any particular code in my project.

Regards