I work with Typo3 ver.12.4. In the extension template file I use this line to load javascript
<v:asset.script name="video_js" path="EXT:cs2_video/Resources/Public/JavaScript/video.js" async="1" standalone="1" overwrite="1" fluid="1"/>
When page is rendered, the page source code look like
<script type="text/javascript" src="https://ems.stage.cs.com/https://ems.stage.cs.com/typo3temp/assets/vhs-assets-video_js.js" async="async"></script>
where the 'http://domain/' is doubled.
Console says
Loading failed for the <script> with source “https://ems.stage.cs.com/https://ems.stage.cs.com/typo3temp/assets/vhs-assets-news_slider_js.js”
Funny is that the dev server works just fine, only stage server does not.
Most probably it is some configuration issue on the stage server, I tried to identify the difference between two servers, no succes.
Does anyone had that experience?
You could try to move from vhs to fluid and use f:asset.script:
https://docs.typo3.org/other/typo3/view-helper-reference/main/en-us/typo3/fluid/latest/Asset/Script.html