Closed hagen closed 4 years ago
Could you please provide the complete folder structure (including Component.js)? It might be a problem that you have multiple resourceroots which do not match with the Component's namespace.
Certainly
Okay, so the issue is that all your modules (views, controller, ...) have to be in the same namespace as the Component is. This is the reason why it did not use the preload.
So the easiest solution would be to remove the view
, util
and thirdparty
resourceroot and adopt the module names to com.ffa.dash.view.*
, com.ffa.dash.util.*
and com.ffa.dash.thirdparty.*
Furthermore you need to configure the prefix
with com/ffa/dash
as this seems to be the namespace of your Component, which is not reflected by the folder structure.
Thank you for the advice @matz3. I have done as you suggested, and the preload builds nicely. My prefix is com/ffa/hpc
, and is the namespace used across all Controllers and Views, and is the only resource root used. The application loads and runs without issue. I have one further question however: the resources loaded by the preload file are located in a folder 'undefined', in the web inspector (Chrome). Is this to be expected, or is something still not quite right? See below...
This looks like an issue. I will look into it, thanks for reporting!
Hi @matz3 we're you able to look into the undefined/ namespace prefix at all? It doesn't affect operation of Component-preload files, but is odd. I will look into this next week also.
@hagen no, I did not have a deeper look into it. Please feel free to do so.
I'm closing this issue as there wasn't an update since quite a while. Please let me know in case this is still relevant. Please also checkout the UI5 Tooling, which is the successor of the grunt tasks: https://sap.github.io/ui5-tooling/
Hi there,
I have similar grunt config to your sample-app, but use different directory names:
When run, I get: Warning: No files found for pattern(s): "/**"! Use --force to continue.
I don't need/want a prefix. I've also noticed that if I start adding in prefixes to keep the warning quiet, the app doesn't use the Component-preload.js, it still reads in each of the Controllers/Views.
Snippet of my index.html:
Directory structure: app -- util -- view ---- App.controller.js ---- App.view.xml
Declaration from App controller: