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

Component-Preload File Problem

Former Member
0 Likes
5,994

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
Abdul_Waheed
Contributor
0 Likes

Can you try adding sap-ui-core-all.js in your bootstrap instead of sap-ui-core.js?

Former Member
0 Likes

Hi,

Thanks for the reply, unfortunately changing it to sap-ui-core-all.js did not change anything about the preloading files.

Regards

Abdul_Waheed
Contributor
0 Likes

Component-preload.js is called by core.

Did you made any changes in local installation ?

Former Member
0 Likes

Hi,

I have switched from eclipse to IntelliJ using a Tomcat server, But after switching back to eclipse which uses the same libraries as the one that works, it Still does not even try to load the component's preload file.

Regards

Abdul_Waheed
Contributor
0 Likes

did it load component-preload in intelliJ ?

Former Member
0 Likes

Hi,

I primarily work in IntelliJ, and it did not load the component-preload file there. So I quickly switched back to eclipse just to test if it works there (which it didn't ).

Do you think it might be something to do with my proxy setup in my component file? It seems to be the only main difference between my apps that load the preload file and the apps that don't.

Regrads

Abdul_Waheed
Contributor
0 Likes

1. May be. Set proxy in eclipse and try.

2. Also, try running using eclipse web app preview instead of tomcat.

Former Member
0 Likes

Hi,

1) I'm a bit confused on how I should setup a proxy in eclipse? I currently have the following in my web.xml:

then I just run my app as a web App in eclipse (in IntelliJ I run it on my Tomcat server). Is there a different method of setting up a proxy to work with ui5?

2) Yea, when I'm testing in Eclipse I run it as a webApp and when I'm working in intelliJ I run it on Tomcat. I moved an app, that loads the preload file correctly, from eclipse to IntelliJ and it worked on both. So I don't think its a problem with my setup (since the working app works on both platforms), I think its something in my Application settings itself. I forgot that I created the base of my app (that doesn't work) in the web IDE, so I'm currently exploring the possibility that the web IDE may have disabled component-preloadng...

Regards

Former Member
0 Likes

Hi, I found the solution. Thank you for helping me. Check the "marked as correct" answer for what the problem was.

Basically 1 line of hidden code caused all my problems...

Abdul_Waheed
Contributor
0 Likes

Glad you found the sollution