It seems my question makes the wrong assumption, that there is a correct place to put that map.
In fact, it seems that the map can be anywhere, it just needs to be specified to Joomla.
One way to do this is to include it in the json assets file. The way I've done it is
The ("a"?) key point is the "importmap" entry.
I don't s'pose the "dependencies" entry is required, nor perhaps the defer attribute.
It seems to require the full path in the uri, this appears to be a full path.
I also s'pose it doesn't have to be in the js directory.
I imagine this can also be done with a "registerAndUseScript" method call on the Web Asset Manager in the default.php (or whichever your file is), ie without including it in the assets file.
You're welcome.
In fact, it seems that the map can be anywhere, it just needs to be specified to Joomla.
One way to do this is to include it in the json assets file. The way I've done it is
Code:
"name":"<my component>.<entry name>","type": "script","importmap": true,"uri": "/media/<my component>/js/<map file name>","dependencies": [ "core" ],"attributes": { "defer": true}
I don't s'pose the "dependencies" entry is required, nor perhaps the defer attribute.
It seems to require the full path in the uri, this appears to be a full path.
I also s'pose it doesn't have to be in the js directory.
I imagine this can also be done with a "registerAndUseScript" method call on the Web Asset Manager in the default.php (or whichever your file is), ie without including it in the assets file.
You're welcome.
Statistics: Posted by MarkRS — Wed Mar 27, 2024 11:29 am