If more then one component (including nested components) are on a single page, they will all attempt to pull in other components, this includes css, internal imports and external esm files.
The nature of the filter means that the qreacto script will run once for each component it comes across. This means that each instance of the script has -to my knowledge- no notion of other scripts running. This can lead to issues where components that have the same dependencies will setup and import those dependencies independently from each other, resulting in a larger file, or multiple cdn requests (though the second one should be cached).
Solution
Investigate if instances of qreacto.lua can read from a shared global variable, update the imports function accordingly.
Alternatively, update the script to load a file and read (from it) a list of all import resources that have already been imported, then update the imports function to only add imports if they are not on the list, then update the list accordingly
Problem
If more then one component (including nested components) are on a single page, they will all attempt to pull in other components, this includes css, internal imports and external esm files.
The nature of the filter means that the
qreacto
script will run once for each component it comes across. This means that each instance of the script has -to my knowledge- no notion of other scripts running. This can lead to issues where components that have the same dependencies will setup and import those dependencies independently from each other, resulting in a larger file, or multiple cdn requests (though the second one should be cached).Solution