Search code examples
javascriptsource-mapslighthouse

JS Source map file doesnt exist - Lighthouse


Lighthouse can't find source map files even though I have added them just after the script themselves.

<script src="https://unpkg.com/swiper@6.5.0/swiper-bundle.js"></script>
<script src="https://unpkg.com/swiper@6.5.0/swiper-bundle.js.map"></script>

enter image description here


Solution

  • That's not how source maps work. You must append //# sourceMappingURL=swiper-bundle.js.map at the end of the JS file.