Skip to Content
0

*-preload file questions

Oct 24, 2016 at 12:55 PM

23

avatar image

Hi!

I have some troubles with preload-files (Component-preload, Library-preload etc.)

1) I tried to create Component-preload.js with grunt. (https://github.com/SAP/grunt-openui5)

Project structure:

As you can see, Component-preload.js is created. But other js-files still are loaded:

I suppose, at least "Component.js", "DialogAnalysis.js", ..., "DialogChoiseSettings.js" should not be loaded, because they are included in Component-preload.js.

I use next code in Gruntfile.js:

 openui5_preload: {
      component: {
        options: {
          compress: true,
          resources: {
            cwd: '',
            prefix: '',
            src: [
              'webapp/**/*.js',
              'webapp/**/*.fragment.html',
              'webapp/**/*.fragment.json',
              'webapp/**/*.fragment.xml',
              'webapp/**/*.view.html',
              'webapp/**/*.view.json',
              'webapp/**/*.view.xml',
              'webapp/**/*.properties',
              '!webapp/**/Component-preload.js'
            ]
          },
          dest: '',
          compress: true
        },
        components: true
      }

How can I fix it?

2) Is it possible to compile SAPUI5-library files in one, if I know all files I need? If possible, how to do it?

3) Ideally I want to get the least amount of files, that contain all necessary: JS-code, XML, JSON, CSS, font-files etc. Is it possible to compile all such files in one? Or smth like that.

P.S. I hope my english isn't too bad.

structure.png (33.4 kB)
console-net.png (16.4 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers