Settings for generating the js file(s)

I couldn't find anything in the support search. Sorry if this question has already been asked.

Maybe this belongs in a feature request.

I can set the creation of the js file to "single file" yes/no. This question is about optimizing/refining this setting.

I have a very large project. It consists of around 30 individual programs (Delphi Project Files). The application often jumps back and forth between the programs. It is therefore a web application consisting of many individual programs.

If I now have the js file setting set to single file, quite large js files are always loaded. A very large part of the sources are used globally by the programs. Now I can change the setting to "one js file per delphi unit". But then I get an insane number of files.

It would be ideal if I could group the js files. E.g. WebCore.js, XData.js, MyBasicPages.js, MyExtensionXY.js, MyCustomer.js and so on.

There could be a directive in each source code file that specifies the module. If the directive does not exist, it is copied into Project.js.

Is there already something for this problem?

If not, I would now ask a JavaScript expert (or do a bit more research myself) to combine the individual js files into different modules.

Is it even worth it?
I still have far too little experience in web development.

I urgently need to optimize my project for speed.

Thank You

Best regards, Thomas

This is a feature request.
Packages are what could be potentially used for this idea, but compiler work will need to be done to allow specifying what required packages are and thus, what units not to include in the project JS file.

This is something we'll add to the feature request list for consideration for future versions.

Great, that would be good. Thanks.

I'll now build something into our build system (we use gulp.js) that comes close to that.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.