You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just cloned the repo and built it using npm run build and then npm run serve-dist to serve the app.
I realized that the file webapp/model/todoitems.json is in Component-repload.json but is loaded separately via a HTTP GET request.
Is this intended?
Is there a way to avoid the additional request and use the Component-preload?
Otherwise I think the todoitems.json should be removed from the Component-preload.
Tested with following versions:
@ui5/cli 2.10.0
OpenUI5 1.87.0
The text was updated successfully, but these errors were encountered:
The additional request is indeed intended. The JSON Model takes care of loading data by itself. In typical scenarios the model data might change or come from a different host. There's not really a use case for having it statically as part of the project resources while still asking the JSON Model to load it, since you could just pass the json to the model directly.
And of course you are right: In this case the JSON should not be part of the Component-preload.js bundle. This is actually an issue of the UI5 Tooling which we also spotted in a different context a while ago. A fix is already in the making: SAP/ui5-builder#580
I just cloned the repo and built it using
npm run build
and thennpm run serve-dist
to serve the app.I realized that the file
webapp/model/todoitems.json
is in Component-repload.json but is loaded separately via a HTTP GET request.Is this intended?
Is there a way to avoid the additional request and use the Component-preload?
Otherwise I think the
todoitems.json
should be removed from the Component-preload.Tested with following versions:
The text was updated successfully, but these errors were encountered: