Re: Where does the core inject all this javascript? |
by skenow on 16/2/2020 14:01:34 From a new post in an old topic - https://www.impresscms.org/modules/iforum/viewtopic.php?post_id=50656#forumpost50656 Wondering about the options below |
Re: Where does the core inject all this javascript? |
by fiammybe on 10/2/2020 14:53:08 As a side note, this thread does not show paragraph tags when I post something new. Strange |
Re: Where does the core inject all this javascript? |
by fiammybe on 10/2/2020 14:52:31 Those issues are the same ones that I encountered during my tests. After that, I was investigating webpack, and there you can include files with a specific directive, and it tells webpack to make it a relative path. Perhaps this kind of functionality should be left to the front-end developers and not taken on by the CMS? |
Re: Where does the core inject all this javascript? |
by skenow on 29/1/2020 19:08:02 There are minify and combine functions in the core - and currently left unused. Mostly because the resulting file was placed in the cache/ folder and at least one of the js and css files had some specific paths that didn't work when the file was in a different location. |
Re: Where does the core inject all this javascript? |
by fiammybe on 29/1/2020 8:10:10 I found the locations in the header file where all the different files were loaded, and I included a switch statement so that I can switch the way includes are done by simply defining a boolean in the theme. When the boolean is true, I include a file 'combined.js' and 'combined.css', which are combined and minified versions of the different javascript and CSS files that are included at the moment. Whent he boolean is false, the old behaviour is still there. This reduces considerably the loading time (first time at least) of a page. I still have some small issues with the minifying, but I think I have identified the problem. |