How do I correct source map errors?
First, I noted that there is an error in the output template for Joomla! 4 such that the links to popper.min.js and bootstrap.min.js came out with an extra slash. The error is in index.php which comes out as:
$doc->addScript(JURI::base() .'/templates/' . $this->template . '/js/jui/popper.min.js', 'text/javascript');
$doc->addScript(JURI::base() ./'templates/' . $this->template . '/js/jui/bootstrap.min.js', 'text/javascript');
It should be:
$doc->addScript(JURI::base() .'templates/' . $this->template . '/js/jui/popper.min.js', 'text/javascript');
$doc->addScript(JURI::base() .'templates/' . $this->template . '/js/jui/bootstrap.min.js', 'text/javascript');
After fixing that, however, I get these errors in the console:
Source map error: Error: request failed with status 403 Resource URL: https://mydomain.com/templates/MyTemplate/js/jui/popper.min.js Source Map URL: popper.min.js.map
Source map error: Error: request failed with status 403 Resource URL: https://mydomain.com/templates/MyTemplate/js/jui/bootstrap.min.js Source Map URL: bootstrap.min.js.map
I removed my domain and template from the errors. Where are the map files and how do I fix this error?