Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES Modules link to not-existing source maps #6863

Closed
6 tasks done
Matt-Kaminski opened this issue Jul 24, 2023 · 0 comments · May be fixed by Aarod23/nys-site#1
Closed
6 tasks done

ES Modules link to not-existing source maps #6863

Matt-Kaminski opened this issue Jul 24, 2023 · 0 comments · May be fixed by Aarod23/nys-site#1

Comments

@Matt-Kaminski
Copy link
Contributor

Matt-Kaminski commented Jul 24, 2023

Check that this is really a bug

  • I confirm

Reproduction link

https://codepen.io/Deleroy/pen/RwqYwbq

Bug description

Using ES modules results in 404 errors in the dev tools due to missing source maps:

DevTools failed to load the source map: Could not load content for https://cdn.jsdelivr.net/npm/swiper@10/shared/swiper-core.mjs.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE.

DevTools failed to load source map: Could not load content for https://cdn.jsdelivr.net/npm/swiper@10/shared/ssr-window.esm.mjs.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

...

Expected Behavior

sourceMappingURL in .mjs files should probably look like this:

//# sourceMappingURL=scrollbar.min.mjs.map

not like this

//# sourceMappingURL=scrollbar.mjs.map

Actual Behavior

No response

Swiper version

10

Platform/Target and Browser Versions

Windows 11 Chrome 115

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
Matt-Kaminski added a commit to Matt-Kaminski/swiper that referenced this issue Jul 24, 2023
This commit addresses an issue with the missing ".min" part in the source map URLs, which leads to broken links for .jsm files. The problem is that the URLs are not correctly formed, causing the files to point to non-existing locations.

In this code change, we have rectified this problem by ensuring that the source map URLs now include the ".min" part. This adjustment ensures that the links to .jsm files are correctly directed to the appropriate URLs, resolving the problem of broken links.

With this fix, the source map URLs will now be accurately generated, and the .jsm files will successfully link to their corresponding source maps, resolving the previously broken links.

Fixes nolimits4web#6863
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant